Python PIP has issues with path for MS Visual Studio 2010 Express for 64-bit install on Windows 7

前端 未结 4 1897
孤城傲影
孤城傲影 2020-12-01 03:26

I was creating a virtualenv with a clean install of python 3.3, 64-bit version. (Note: I have several installs of python on my computer including WinPython but want to set

相关标签:
4条回答
  • 2020-12-01 03:43

    Ultimately I was able to get pip running. In a nutshell (and redundant from info above) here is what I did to intall 64-bit packages for python 3.3:

    1) Installed Microsoft Visual C++ 2010 Express Download Here (http://www.visualstudio.com/downloads/download-visual-studio-vs)

    2) Installed Microsoft SDK 7.1 (Windows 7) (http://www.microsoft.com/en-us/download/details.aspx?id=8279)

    3) Built/enabled the 64-bit tools in SDK. Go to start menu and under Microsoft Windows SDK v7.1 folder, select Windows SDK 7.1 Command Prompt. A shell will come up. Type the following command setenv /x64.

    4) I installed a fix (don't know if it was ultimately needed.) (http://support.microsoft.com/kb/2519277)

    5) Created a new vcvars64.bat file under C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64. Inside of that new batch file I included only the line CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64. I am assuming what this does is forces distutils to use the C++ compiler from the SDK. Pip installed correctly after this. As I understand, the C++ compiler has to be the same as that used to compile python 3.3. From my research, it seems that the SDK as installed is that same compiler but just doesn't require that the original vcvars64.bat file be present. This information came from: http://www.w7forums.com/threads/vcvarsall-bat-no-64bit-support-vcvars64-bat-missing.6606/ . Please correct me if I am creating problems down the road with this solution. Thanks.

    0 讨论(0)
  • 2020-12-01 03:43

    For me it was sufficient to perform steps 1, 2 and 5, step 4 was not required:

    1) Install Microsoft Visual C++ 2010 (in my case not Express)

    2) Install Microsoft SDK 7.1 (Windows 7)

    Skip 3 and 4.

    5) Create C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat containing the line CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64

    Done: pip3 install numpy works.

    0 讨论(0)
  • 2020-12-01 03:44

    The 5th step did not work for me (I am using VC++ 10 Express). I finally got pip working by running pip install in the SDK command prompt after typing setenv /x64 (running pip in the normal cmd.exe prompt did not work).

    0 讨论(0)
  • 2020-12-01 03:52

    Here is what I did to intall 64-bit packages for python 3.4.4 on a windows 10 x64 and x64 based processor:

    0)Use precompiled amd64 whl's for everything possible, and the following method for anything that threw errors

    1a) Installed Microsoft Visual C++ 2010 Express

    1b) Uninstalled Microsoft Visual C++ 2010 Express redistributable via control panel

    2) Installed Microsoft SDK 7.1 (Windows 10)

    3) I installed fix (http://support.microsoft.com/kb/2519277)

    4) Created a new vcvars64.bat file under C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 including only the line

    CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
    

    5)Running pip install in the SDK command prompt after typing

    setenv /x64
    

    and

    set DISTUTILS_USE_SDK=1
    
    0 讨论(0)
提交回复
热议问题