Python Resources

Exercises in Python are an important part of the class.  You have several choices for working on the exercises:
  • The SCI machines (please get an account there even if you do most of your work elsewhere)
  • A Linux machine--all the packages below are available on Ubuntu, OpenSuSE, and other major Linux distributions.
  • A Windows or Macintosh machine--for those, your best bet is to go to and follow the instructions there.


There will be a number of examples in the SageMath notebook throughout the course.  There is more information at  Here's a quick visual tour of how SageMath notebooks work:

Introduction to SageMath Notebook

You can view SageMath notebooks for the class (and other classes) at (this will change soon).  You can download your own SageMath installation from (that includes all the required packages).  You can also sign up for an account at (although that site seems to have availability problems).

You can do some exercises in SageMath, but you really should learn how to use Python directly, since you need that for building larger and more complex pattern recognition and AI systems.

Python and Packages

Most of our work in the class is using  the following packages:
For Python development, a text editor is sufficient: you edit your source files in the editor and then switch to a different window where the Python command line interpreter is running.  You can load, reload, and experiment in that window.  You can use either the python command or the enhanced ipython ( command.

You can find plenty of documentation on Python on those sites.

Python IDEs

If you want something more featureful, there are a number of IDEs:
  • Emacs -- steep learning curve, but very useful and stable afterwards
  • DrPython -- easy to set up and use
These also seem to be useful:
  • spe -- full featured Python IDE
  • eric3 -- full featured Python IDE
  • Eclipse + PyDev -- complicated to set up
  • kedit -- KDE text editor with some IDE features