Changes Saved

How to install Python

For Windows

Download Python 3.4 for Windows.  Install it by double clicking on the icon. Once Python is installed, go to 'Start', right click on 'Computer', select properties. Click on "Advanced system settings". Click "Environment Variables". Under "System variables" select "Path". Click "Edit", and in "Variable value:" append

;C:\Python34;C:\Python34\Lib;C:\Python34\DLLs;C:\Python34\scripts

Congratulations! Python is installed.  Now you'll probably want some packages.

Installing Packages

There are two ways to install packages in python on Windows:

The easy way

The first way to install things is from a package which was already compiled for Windows. Christoph Gohlke from the Laboratory for Fluorescence Dynamics at UCI keeps a site which contains the compiled versions of lots of useful packages. Installing is as simple as downloading the files and double clicking them. If they aren't on that site, you'll need to install then the hard way (see below).

If you're running Python2.7 on a 64-bit machine (which you should be), always install the 2.7, 64-bit version of the package.

The hard way

The second way to install packages is via pip. For example, to install the package six, in command line run:

pip install six

Do the same for all packages in the list above.  This is probably the best way to install things, but it fails when the python package you are installing requires a compiler and you don't have one. The compiler must be the same as the one used to compile your version of python. This guide is helpful for explaining python's packaging ecosystem.  

For Python 3.5, install Visual Studio Community 2015 here. During installation, choose Custom Install and uncheck everything except for "Common Tools for Visual C++ 2015".  Now you should be setup to install things that require compiling.

For Python 2.7, install the Visual C++ 2008 Express Edition here. Then follow these instructions to install the Windows SDK C/C++ compiler. Basically, install this. Then go to Start->All Programs-> Microsoft Windows STK v7.0->CMD Shell. Right click CMD Shell and select "Run as Administrator".  When the command line starts, type the following commands.

set DISTUTILS_USE_SDK=1setenv /x64 /release

Then without closing the STK shell, type

pip install ipython