Python, failed to install. Exit code: 1 windows 10

允我心安 提交于 2020-02-15 18:26:06

问题


So, I have going over this back and forth, I tried several of the solutions on this forum, none worked.

I have pip3 installed, Python 3.4, Visual Studio 2015 on Windows 10.

Now whenever I run the installing for a new module manually or through pip3 I get the following error:

Say I use the cmdline as such:

pip3 install numpy

I get :

error: Unable to find vcvarsall.bat

----------------------------------------
Command "c:\users\ariel\appdata\local\programs\python\python35-32\python.exe -c 
"import setuptools, tokenize;__file__='C:\\Users\\Ariel
\\AppData\\Local\\Temp\\pip-build-41rz6w_o\\numpy\\setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read()
.replace('\r\n', '\n'), __file__, 'exec'))" install --record 
C:\Users\Ariel\AppData\Local\Temp\pip-vuq3ap0m-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1
in C:\Users\Ariel\AppData\Local\Temp\pip-build-41rz6w_o\numpy

If I download it and run it from the folder

 setup.py install

I get

build_src
building py_modules sources
building library "npymath" sources
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat

Please help, considering to just use linux with python... less issues


回答1:


This is based on @Jim answers in the comment section, basically make sure that you have the C++ compiler and windows SDK installed!

My problem was that when I installed Visual Studio, I did not select the windows SDK.



来源:https://stackoverflow.com/questions/34773621/python-failed-to-install-exit-code-1-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!