Q&A
実現したいこと
soundfileをimportしたいです
homebrewでpyenvをinstallしており,pythonのバージョンは3.9.6です.
発生している問題・エラーメッセージ
pip install soundfileを実行するとinstallに成功しました.
pip listにもSoundFileがあります.
この状態で,import soundfileを実行すると以下のエラーが発生します.ご助言いただけると幸いです.
terminal
1Traceback (most recent call last): 2 File "/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/soundfile.py", line 142, in <module> 3 raise OSError('sndfile library not found') 4OSError: sndfile library not found 5 6During handling of the above exception, another exception occurred: 7 8Traceback (most recent call last): 9 File "<stdin>", line 1, in <module> 10 File "/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/soundfile.py", line 162, in <module> 11 _snd = _ffi.dlopen(_os.path.join( 12OSError: cannot load library '/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/_soundfile_data/libsndfile.dylib, 2): image not found
試したこと
https://pysoundfile.readthedocs.io/en/latest/
などによるとlibsndfileが必要とあるのでbrew install libsndfileを実行し,installしています.
補足情報(FW/ツールのバージョンなど)
macOS big Sur
バージョン 11.6.5
macbook air (M1, 2020)
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。