When I try to use anything that's related to the module librosa, I get an error:
Traceback (most recent call last):
File "C:\Users\User1\Documents\test3.py", line 36, in <module>
x, Fs = librosa.load(fn_mp3, sr=None)
File "C:\Program Files\Python38\lib\site-packages\librosa\core\audio.py", line 129, in load
with sf.SoundFile(path) as sf_desc:
File "C:\Program Files\Python38\lib\site-packages\soundfile.py", line 629, in __init__
self._file = self._open(file, mode_int, closefd)
File "C:\Program Files\Python38\lib\site-packages\soundfile.py", line 1172, in _open
openfunction = _snd.sf_wchar_open
AttributeError: cffi library 'C:\Program Files\Python38\lib\site-packages\_soundfile_data\libsndfile64bit.dll' has no function, constant or global variable named 'sf_wchar_open'
Before I had an error with something about libsndfile64bit.dll
then I created a folder in site-packages called _soundfile_data and downloaded libsndfile64bit.dll
from here then added it to the folder then the error I provided popped up.
I have tried searching on SO for answers but there are no questions related, I cannot edit libsndfile64bit.dll
therefore I cannot do anything. I'm on Windows OS 64x, Python 3.8 and librosa 0.7.2.
I tried @Maos Tamir answer but didn't worked
What worked for me:
1.- Open anaconda prompt
2.-activate the desired venv
If Originally installed with conda:
3.- conda uninstall librosa
4.-pip uninstall soundfile
5.- pip install librosa
6.- Close prompt
7.- restart kernel if using jupyter notebooks
please upgrade soundfile, use: pip install -U soundfile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With