我正在尝试在 Anaconda 环境中安装 librosa,我创建了一个全新并已安装的 librosa,但是即使我重新安装 cffi 包、audioread 等,我仍然会遇到这个问题。我不确定如何解决这个问题。
AttributeError Traceback (most recent call last)
<ipython-input-4-d10be33b41bf> in <module>
1 # load files with librosa as a series of floating points
----> 2 debussy, sr = librosa.load(debussy_file)
~\.conda\envs\librosa\lib\site-packages\librosa\core\audio.py in load(path, sr, mono, offset, duration, dtype, res_type)
144
145 try:
--> 146 with sf.SoundFile(path) as sf_desc:
147 sr_native = sf_desc.samplerate
148 if offset:
~\.conda\envs\librosa\lib\site-packages\soundfile.py in __init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
625 self._info = _create_info_struct(file, mode, samplerate, channels,
626 format, subtype, endian)
--> 627 self._file = self._open(file, mode_int, closefd)
628 if set(mode).issuperset('r+') and self.seekable():
629 # Move write position to 0 (like in Python file objects)
~\.conda\envs\librosa\lib\site-packages\soundfile.py in _open(self, file, mode_int, closefd)
1168 if isinstance(file, _unicode):
1169 if _sys.platform == 'win32':
-> 1170 openfunction = _snd.sf_wchar_open
1171 else:
1172 file = file.encode(_sys.getfilesystemencoding())
AttributeError: cffi library 'C:\Users\User\.conda\envs\librosa\Library\bin\sndfile.dll' has no function, constant or global variable named 'sf_wchar_open'