Windows上安装scipy错误:Microsoft Visual C++ 14.0 is required

pip install scipy错误

running build_ext
building ‘spacy.parts_of_speech’ extension
error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools

Failed building wheel for spacy
Running setup.py clean for spacy
Running setup.py bdist_wheel for ujson … error
Complete output from command D:\Programs\Anaconda3\python.exe -u -c “import setuptools, tokenize;file=’C:\Users\Skanda\AppData\Local\Temp\pip-bu
ttr(tokenize, ‘open’, open)(file);code=f.read().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d C:\Users\Skanda\A
l- –python-tag cp35:
running bdist_wheel
running build
running build_ext
building ‘ujson’ extension
error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools

解决办法

Microsoft Visual C++ 14.0中,版本14.0对应的是Visual Studio 2015,所以你需要先安装VS2015,并且在选择VS的组件是将C++对应的组件Visual C++ build tools选上。
安装完成之后,重新启动一个cmd窗口,然后继续安装即可。

如果遇到其它问题,可以参考:Windows上使用pip安装scipy错误:Running setup.py bdist_wheel for scipy error

By Code问答

发表评论

电子邮件地址不会被公开。 必填项已用*标注

62 − = 58