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

前端 未结 4 713
夕颜
夕颜 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 10:03

    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.

提交回复
热议问题