我正在努力导入Librosa库以进行声音分析。当我进入
import librosa
我收到以下错误
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "c:\python35\lib\site-packages\librosa\__init__.py", line 13, in <module>
from . import decompose
File "c:\python35\lib\site-packages\librosa\decompose.py", line 19, in <module>
import sklearn.decomposition
File "c:\python35\lib\site-packages\sklearn\__init__.py", line 57, in <module>
from .base import clone
File "c:\python35\lib\site-packages\sklearn\base.py", line 12, in <module>
from .utils.fixes import signature
File "c:\python35\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
from .validation import (as_float_array,
File "c:\python35\lib\site-packages\sklearn\utils\validation.py", line 18, in <module>
from ..utils.fixes import signature
File "c:\python35\lib\site-packages\sklearn\utils\fixes.py", line 406, in <module>
if np_version < (1, 12, 0):
TypeError: unorderable types: str() < int()
我正在尝试在Windows OS,Python 3.5 64位上执行所有操作。我是否需要安装其他库?我已经安装了许多其他库,例如numpy,matplotlib,scipy和其他一些基本库。请说明发生了什么事:(
最佳答案
尝试使用:pip install librosa
You should get a bunch of messages like:
Collecting librosa
Downloading librosa-0.5.1.tar.gz (1.5MB)
100% |████████████████████████████████| 1.5MB 312kB/s
Collecting audioread>=2.0.0 (from librosa)
Downloading audioread-2.1.5.tar.gz
Requirement already satisfied: numpy>=1.8.0 in c:\users\j\miniconda3\lib\site-packages (from librosa)
Requirement already satisfied: scipy>=0.13.0 in c:\users\j\miniconda3\lib\site-packages (from librosa)
Requirement already satisfied: scikit-learn>=0.14.0 in c:\users\j\miniconda3\lib\site-packages (from librosa)
Collecting joblib>=0.7.0 (from librosa)
Downloading joblib-0.11-py2.py3-none-any.whl (176kB)
etc. etc. etc.
然后安装其他库中的librosa。
PS。看起来我们正在从事同一个项目?
关于python - 在python上导入Librosa时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42911383/