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

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.


Although the accepted answer is working, it's an unnecessary monkey-patch to a battle-tested library.

To fix the issue at it's core: Simply add (x86 or x64 - depending on your target) Microsoft Manifest Tool (mt.exe) to your path and install numpy through pip.

Since Visual Studio 2017, mt.exe has moved to the Windows SDK 7.1/8.1/10, which needs to be installed.

My mt.exe (x86) is located in: C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86 so that's what I have added to the path, do that ether through Control Panel > System > Advanced system settings > Environment Variables or by using the pathman command in the console (cmd.exe).

Hope it helps, happy compiling!


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:

  • https://bitbucket.org/jurko/cpython/src/b0962aec201e7d4b4f1ac32dbc130379ec6d943a/Lib/distutils/msvc9compiler.py?at=jurko/distutils_msvc_express_fix

  • https://bitbucket.org/jurko/cpython/src/b0962aec201e7d4b4f1ac32dbc130379ec6d943a/Lib/distutils/msvccompiler.py?at=jurko/distutils_msvc_express_fix

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