當我嘗試(在Windows 10)運行:錯誤而安裝sklearn
pip install sklearn
我得到
copying sklearn\tests\test_pipeline.py -> build\lib.win-amd64-3.6\sklearn\tests
copying sklearn\tests\test_random_projection.py -> build\lib.win-amd64-3.6\sklearn\tests
copying sklearn\tests\__init__.py -> build\lib.win-amd64-3.6\sklearn\tests
running build_clib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_clib
building 'libsvm-skl' library
compiling C sources
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\sklearn
creating build\temp.win-amd64-3.6\sklearn\svm
creating build\temp.win-amd64-3.6\sklearn\svm\src
creating build\temp.win-amd64-3.6\sklearn\svm\src\libsvm
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I"c:\program files\python\lib\site-packages\numpy\core\include" /EHsc /Tpsklearn\svm\src\libsvm\libsvm_template.cpp /Fobuild\temp.win-amd64-3.6\sklearn\svm\src\libsvm\libsvm_template.obj
Could not locate executable cl.exe
Executable cl.exe does not exist
error: Command "cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I"c:\program files\python\lib\site-packages\numpy\core\include" /EHsc /Tpsklearn\svm\src\libsvm\libsvm_template.cpp /Fobuild\temp.win-amd64-3.6\sklearn\svm\src\libsvm\libsvm_template.obj" failed with exit status 1
----------------------------------------
Command ""c:\program files\python\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\$andu\\AppData\\Local\\Temp\\pip-build-cho6u5yy\\scikit-learn\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\$andu\AppData\Local\Temp\pip-977em_sb-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\$andu\AppData\Local\Temp\pip-build-cho6u5yy\scikit-learn\
沒有發現的建議在網上爲我工作的一個長長的清單。
我該如何處理?
我有numpy-1.12.1+mkl-cp36-cp36m-win_amd64.whl
和安裝scipy-0.19.0-cp36-cp36m-win_amd64.whl
。
您sugg estion不起作用 –