Python Installation

Python and Scientific Packages

While you may already have Python itself installed on your computer, you also need several packages for scientific computing, plotting, linear algebra, and serial communication. Getting things working correctly in Windows is particularly tricky. There are several companies who are willing to help with this problem, but they are trying to find ways to make themselves more money and are making it harder to get pyserial installed manually. Here are some suggestions:

Anaconda (simplest solution, but a large and slightly long installation)

Continuum Analytics is a company that wants to provide powerful Python computational tools. There free package contains everything we need other than pyserial.


  1. uninstall any Python things you have installed (strongly recommended)
  2. download Anaconda:
    • Go to this page and click the "Free" button next to "Download Anaconda". They will require your email, but you are then able to download the installer (around 300 megs).
    • Anaconda recommends Python 2.7 as the default. Even though this is a bit old, I would recommend that you do install 2.7. I know for sure that all of the scientific packages work with 2.7.
  1. Run the Anaconda installer. Note: when you run the installer, it is very important that you click the box that says "Register Anaconda as the default Python version of the system." If you don't click that box, you will have a very difficult time installing pyserial.

  2. Download and install pyserial. That link should take you directly to the correct exe file. You want the exe file for win32, and you do not want py3k.

  3. Launch Spyder as your Python environment.

    • configure Spyder to load the scientific startup file. Here is a video showing how to do it: spyder_config_video.wmv
  4. If you plan to use the IPython terminal or the IPython QT console, configure them to load scientific environment (pylab) as welll. Here is another video: ipython_config_video.wmv

Spyder has a built in text editor, but it also seems to play nice with other editors if you prefer (i.e. when you are done editing and switch back to Spyder, it automatically reloads the file).

Manual Installation (shortest and smallest, but most complicated)

  1. uninstall any Python things you have installed (strongly recommended)
  2. install Python 2.7. This might be overly conservative, but most scientific Python people that I know have not switched to Python 3 yet.
  3. download and install the scientific packages. These are tricky because you have to find the right packages for your architecture and OS. You are probably looking for win32 exe or msi files that work with python 2.7.
    • numpy (I think this is the correct link)
    • scipy link
    • matplotlib
    • ipython
      • The ipython installer has been broken for awhile. This is really annoying. Their website says to install Anaconda or EPD Free. The last ipython version with a working installer is 0.12.1
    • pyserial

EPD Canopy Options

Enthought is the company behind Numpy and Scipy. They used to have an easy option that met our needs. They are now trying to make more money for themselves and have made it very difficult to install your own packages from within EPD Canopy. You have two options in my opinion if you want to go with Canopy:

  1. Install the free version, then install pyserial yourself. The problem is that the pyserial installer will put the files where Canopy refuses to look for them. You then have to add two lines to the top of any file that uses pyserial:

    import sys
  2. Install the academic version of EPD Canopy. You should be able to install pyserial from the Canopy package manager (I haven't tested this).

Text Editor

In addition to Python and the scientific packages, you will also need a decent text editor to edit your Python scripts. Notepad++ isn't great, but it is a decent option for Windows (much better than the Notepad that comes with Windows). Aquamacs is the best free editor I have come across for Mac OSX.

PyLab (IPython), Spyder, or Wing 101

PyLab (provided by the IPython package) provides several very nice improvements over a basic Python shell. The three biggest improvements are a separate graphics thread (so you don't have to close all your plots each time you run a script), tab completion, and a built-in help system. You are strongly encouraged to use PyLab rather than any other a basic Python shell. Spyder and Wing 101 also provide good alternatives to a basic Python shell.