Value error trying to install Python for Windows extensions

前端 未结 7 1031
清歌不尽
清歌不尽 2020-11-27 05:42

I have Microsoft Visual Studio 2008 installed already. I downloaded the zip file Python for Windows extensions and extracted the contents into my Python27 folder. There\'s n

相关标签:
7条回答
  • 2020-11-27 06:06

    If you are fixed on Python 2.7 64-bit (like I am) and too cheap to buy VS2008 Professional, you can also download VS2008 Express and install the Windows 7 SDK to get a compatible 64-bit compiler for free. After that, run the Windows 7 SDK SetEnv.Cmd script and then the setup.py:

    > "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"
    > setup.py -q install
    

    The SetEnv.Cmd should set up all the environment variables you need for build. When it runs, there should be a message that says "Targeting Windows 7 x64 Debug". You can also use this command to compile in Release mode:

    > "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release
    > setup.py -q install
    
    0 讨论(0)
提交回复
热议问题