2017-03-20 94 views
0

我很努力導入Librosa庫進行聲音分析。當我進入python上導入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操作系統上的一切,Python的3.5 64位。我是否需要安裝其他庫?我已經安裝了一些其他庫,如numpy,matplotlib,scipy和其他幾個重要的庫。請解釋一下這是怎麼回事:(

回答

0

嘗試使用:PIP安裝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看起來我們是在同一個項目上工作??。