実現したいこと
soundfileをimportしたいです
homebrewでpyenvをinstallしており,pythonのバージョンは3.9.6です.
発生している問題・エラーメッセージ
pip install soundfileを実行するとinstallに成功しました.
pip listにもSoundFileがあります.
この状態で,import soundfileを実行すると以下のエラーが発生します.ご助言いただけると幸いです.
terminal
Traceback (most recent call last): File "/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/soundfile.py", line 142, in <module> raise OSError('sndfile library not found') OSError: sndfile library not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/username/.pyenv/versions/3.9.6/lib/python3.9/site-packages/soundfile.py", line 162, in <module> _snd = _ffi.dlopen(_os.path.join( OSError: 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)
まだ回答がついていません
会員登録して回答してみよう