Installing Python on Windows
Note: I highly recommend simply using a pre-built distribution like anaconda. These instructions are for setup using the official binaries and a build environment for building native extensions.
- First choose if you want the 2.7 version or the 3.4. The 3.4 is the most modern and it is stable, however, there are still some popular packages that do not support python 3. 2.7 is usually the safer bet if you don't know.
- Download the MSI package from https://www.python.org/download/releases/2.7.8/
- Ensure you select the "Add python.exe to Path" option in the installer if you want to add python to your path. It is not checked by default.
- It's recommended to use the 32-bit version as it is easier to satisfy the install requirements for building native extensions (ie. Visual Studio Express)
- After it's installed download the "get-pip.py" script from https://bootstrap.pypa.io/get-pip.py. Save it somewhere convienient. This script is a simple way to get the package managers pip and easy_install.
- In a fresh terminal window run
python get-pip.pywhere you downloaded the script above.
- Finally, add the
scriptsdirectory in the python installation to your PATH. This is where python drops executable scripts (such as the package managers installed above) and it does not add this to your PATH automatically. On python 2.7 this is usually
- Install packages with
pip install packagenamefor example to install the
pip install requests
- Some packages might require you to use
easy_installinstead of pip. This will usually be noted in the package documentation.
Useful General Purpose Packages
List of useful packages that work on Windows. Use
pip install packagename
ipython[notebook]: Much better interactive and browser based shell (use the ipython[notebook] package name to install optional dependencies.
requests: Easy HTTP library
awscli: Official (new) Amazon Web Services CLI
boto: Full fledged interface to Amazon Web Services, the core of which is used by the awscli
flask: Lightweight web framework
sqlalchemy: Relational Database Framework and ORM
pandas: Data analysis built on top of numpy
- See the note below on building native extensions which is required to build this package
robotframework: Automated acceptance testing framework. Recommend also the following packages:
You will need to install Visual Studio 2008 express to build python native extensions required for some packages. Note this is recommended even if you have a newer version of Visual Studio because of the version Python is installed with. It can be downloaded here: http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso. Note it is safe to install multiple versions of Visual Studio side by side. Be sure to install the "Visual C++" option (and any others you would like). This will give you the proper environment variables and build tools.