我试图安装sklearn/scipy/scikit-learn在我的Windows笔记本电脑与Pycharm的一个项目,但它一直失败与以下错误.当我尝试pip安装sklearn从终端,它通过,但程序是不工作,并抱怨仍然与模块未找到错误.
不确定,为什么pycharm失败...得到这个错误,我不确定这是什么
* "WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"*
* Collecting sklearn
Using cached sklearn-0.0.tar.gz (1.1 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting scikit-learn
Using cached scikit_learn-1.1.2-cp38-cp38-win32.whl (6.6 MB)
Collecting scipy>=1.3.2
Using cached scipy-1.9.2.tar.gz (42.1 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
[49 lines of output]
+ meson setup --native-file=C:\Users\vinod\AppData\Local\Temp\pip-install-ka425mpg\scipy_2429ab45c5ae41bc9802aaa34bafeb6e\.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=C:\Users\vinod\AppData\Local\Programs\Python\Python38-32 C:\Users\vinod\AppData\Local\Temp\pip-install-ka425mpg\scipy_2429ab45c5ae41bc9802aaa34bafeb6e C:\Users\vinod\AppData\Local\Temp\pip-install-ka425mpg\scipy_2429ab45c5ae41bc9802aaa34bafeb6e\.mesonpy-fpbohej2\build
The Meson build system
Version: 0.63.3
Source dir: C:\Users\vinod\AppData\Local\Temp\pip-install-ka425mpg\scipy_2429ab45c5ae41bc9802aaa34bafeb6e
Build dir: C:\Users\vinod\AppData\Local\Temp\pip-install-ka425mpg\scipy_2429ab45c5ae41bc9802aaa34bafeb6e\.mesonpy-fpbohej2\build
Build type: native build
Project name: SciPy
Project version: 1.9.2
WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
..\..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
The following exception(s) were encountered:
Running `icl ""` gave "[WinError 2] The system cannot find the file specified"
Running `cl /?` gave "[WinError 2] The system cannot find the file specified"
Running `cc --version` gave "[WinError 2] The system cannot find the file specified"
Running `gcc --version` gave "[WinError 2] The system cannot find the file specified"
Running `clang --version` gave "[WinError 2] The system cannot find the file specified"
Running `clang-cl /?` gave "[WinError 2] The system cannot find the file specified"
Running `pgcc --version` gave "[WinError 2] The system cannot find the file specified"
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.*
1条答案
按热度按时间lg40wkob1#
从试图安装的
sklearn
轮来判断,您似乎使用的是32位Python。scipy
没有可用于1.9.2版本的32位轮。提供32位轮的scipy的最新版本是1.9.1。你应该可以
pip install scipy==1.9.1
。