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

前端 未结 4 719
夕颜
夕颜 2020-12-09 09:19

I am unable to install numpy via pip install numpy on my computer running Python 3.4 due to various errors I receive linked to compilation issues (This is only the case on a

4条回答
  •  悲哀的现实
    2020-12-09 09:39

    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!

提交回复
热议问题