Compiler problems with pip during numpy install under Windows 8.1, 7 Enterprise and 7 Home Editions

喜你入骨 提交于 2019-11-30 06:11:41

I was able to reproduce all these errors in Windows 7 Professional (64 bit).

Your final issue (Broken toolchain) is caused by more manifest related issues. I was able to work around this by changing the following line (in msvc9compiler.py):

mfinfo = self.manifest_get_embed_info(target_desc, ld_args)

to

mfinfo = None

thus bypassing the if statement which immediately follows. After this change numpy successfully compiled for me.

I think the easiest solution will be to open the Visual Studio command prompt (you should not need any other fixes, just the latest version of Python 2 or 3).

Specifically, in your Start menu, you should have something like "Visual Studio Command Prompt (2010)". Open this program (it will open a command prompt), then in the command prompt, type:

pip install numpy

Comments:

1) Different versions of Python are meant to be compiled with different versions of Visual Studio. I think that the Python guys intend for you to compile with the 2010 version (I could be wrong about this), so trying to open the Visual Studio 2013 prompt might not work. It could be that the newest version of Python switched compilers, but I would start by trying the 2010 command prompt.

2) You might have multiple command prompt options. I have had luck with just the bare bones version "Visual Studio Command Prompt (2010)"

3) To install Python 3.4, I could simply open a standard command prompt, and then

pip install numpy

but for Python 2.7, I had to use this command prompt trick.

Nuno Aniceto

If you didn't fixed the issue with those steps please check this simple solution that helped me to build numpy: Go to Jurko's repository * in which he is patching/improving the scripts for building with MSVC and download/copy paste the files:

msvc9compiler.py
msvccompiler.py

Links:

Save them in the folder '\Lib\distutils\' of your python installation directory, eg: "C:\WinPython-64bit-3.4.3.2\python-3.4.3.amd64\Lib\distutils".

There are several other solutions related to this issue of building python modules with pip/easy_install, eg: error: Unable to find vcvarsall.bat ; Unable to find vcvarsall.bat using Python 3.3 in Windows 8 that seem unsolvable sometimes.

My system: windows 7, windows sdk 7.1, vs2010 express with sp1, python 3.4.3, 64 bit

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