Installing Python in Windows 7 is simple, because a pre-built Windows installer exists. The problem begins when you are trying to compile another Python based libraries, which are asking for e.g. python27_d.lib file. This file is absent, thus you have to build the Python source files from scratch. Python distribution includes SLN files for Visual Studio, but if you try to run them, you’ll get errors. The official explanations of the installation process in Windows … well, I can’t understand from there what to do with the errors.
Still, there is a simple enough solution:
- Install VS2008. This will not work for other versions.
- Install the Netwide Assembler: www.nasm.us , click on “DOWNLOAD” link, choose the latest stable version directory (not rc), click on “win32” directory, download and run the installer (e.g., http://www.nasm.us/pub/nasm/releasebuilds/2.09.10/win32/nasm-2.09.10-installer.exe). The program should be installed to C:\Program Files\NASM.
- Go to C:\Program Files\NASM\ and rename the file nasm.exe to nasmw.exe.
- Install Cygwin from cygwin.com: Choose all default settings, except the addition of the following packages:
- Add to the PATH the directories C:\Program Files\NASM\ and C:\cygwin\bin: go to Control Panel, start searching for env…and choose “Edit the system environment variables” –>Environment Variables…–>Edit PATH variable.
- Download the Python source code from python.org site: e.g. http://python.org/ftp/python/2.7.2/Python-2.7.2.tgz
- Create directory: C:\Python27 and copy all the source files and sub-directories there. If everything is okay, you should see the directory C:\Python27\PCbuild.
- Run cmd as administrator: Start button–>All Programs–>Accessories–>Right click on Command Prompt–>Run as Administrator.
- In the open terminal write the following:
- cd C:\Python27
- The Debug version of Python should be installed without errors.
- Getting Started with Python – Installing Packages (craigkerstiens.com)
- Dive Into Python Updated for Python 3 (readwriteweb.com)
- Installing Python 2.7 on Ubuntu (eli.thegreenplace.net)