# Install Python From the Source Code

Image via Wikipedia

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:

1. Install VS2008. This will not work for other versions.
2. 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.
3. Go to C:\Program Files\NASM\ and  rename the file nasm.exe to nasmw.exe.
4. Install Cygwin from cygwin.com: Choose all default settings, except the addition of the following packages:
1. curl
2. cvs
3. git
4. subversion
5. tcltk
6. unzip
7. zip
5. 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.