我使用Python 3.5和所有的包都是在以下版本類型錯誤:unorderable類型:STR()<INT()
numpy-1.12.0b1+mkl-cp35-cp35m-win_amd64
scikit_learn-0.18.1-cp35-cp35m-win_amd64
scipy-0.18.1-cp35-cp35m-win_amd64
我用的是Windows操作系統。
當我使用scikit_learn,我得到了以下信息,
Traceback (most recent call last):
File "F:/liyulin/tf_idf2.py", line 7, in <module>
from sklearn import feature_extraction # sklearn是一個數據挖掘工具包
File "C:\Users\lijia_xin\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\__init__.py", line 57, in <module>
from .base import clone
File "C:\Users\lijia_xin\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\base.py", line 12, in <module>
from .utils.fixes import signature
File "C:\Users\lijia_xin\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
from .validation import (as_float_array,
File "C:\Users\lijia_xin\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\utils\validation.py", line 18, in <module>
from ..utils.fixes import signature
File "C:\Users\lijia_xin\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\utils\fixes.py", line 406, in <module>
if np_version < (1, 12, 0):
TypeError: unorderable types: str() < int()
Process finished with exit code 1
這是我第一次提問
解決它請幫助。
@MoinuddinQuadri回溯顯然表明它導入失敗。看來外部封裝已經壞了。 – freakish