我試圖通過運行安裝Scikit:Scikit安裝詢問SciPy的,即使它是安裝
pip install scikit-learn
當我運行它,我得到這個消息:
Collecting scikit-learn
Using cached scikit-learn-0.18.1.tar.gz
Installing collected packages: scikit-learn
Running setup.py install for scikit-learn ... error
Complete output from command c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\USER\\AppData\\Local\\Temp\\pip-build-3080ikpy\\scikit-learn\\setup.py';f=getatt
r(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\USER\AppData\Local\Temp\pip-04zx4iu6-record\i
nstall-record.txt --single-version-externally-managed --compile:
Partial import of sklearn during the build process.
Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Temp\pip-build-3080ikpy\scikit-learn\setup.py", line 149, in get_scipy_status
import scipy
File "c:\python36\lib\site-packages\scipy\__init__.py", line 61, in <module>
from numpy._distributor_init import NUMPY_MKL # requires numpy+mkl
ImportError: cannot import name 'NUMPY_MKL'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER\AppData\Local\Temp\pip-build-3080ikpy\scikit-learn\setup.py", line 270, in <module>
setup_package()
File "C:\Users\USER\AppData\Local\Temp\pip-build-3080ikpy\scikit-learn\setup.py", line 260, in setup_package
.format(scipy_req_str, instructions))
ImportError: Scientific Python (SciPy) is not installed.
scikit-learn requires SciPy >= 0.9.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
這似乎問我安裝SciPy的,但是我已經安裝SciPy的,而事實上,如果我跑
pip install scipy
我得到
Requirement already satisfied: scipy in c:\python36\lib\site-packages
Requirement already satisfied: numpy>=1.8.2 in c:\python36\lib\site-packages (from scipy)
你安裝了什麼版本的scipy? –
我有版本0.19 32位 – Nadni
你的機器上已經安裝了numpy和mkl嗎?然後你會嘗試安裝scipy。獲得Scipy生態系統工作的最簡單方法可能是收集所有那些包:http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy – tagoma