You are here: Download Web>RequiredPackagesRelease42 (26 Jan 2010)

Required and Optional Python Packages for Stable Release 4.2.2

The list on this page is for stable release 4.2.2. Please see RequiredPackagesDevVersion for a list of required and optional Python packages for the latest development version. We are moving to Python 2.6 in the development release and will be updating the package version numbers in the instructions below for the 4.3.0 release. Consider creating and activating a virtual Python environment with Python 2.5 before proceeding.

Some additional Python libraries are required, recommended, or optional for use with Opus. You must have the required libraries to run Opus. The recommended libraries are not necessary to run Opus, but certain functionality will be unavailable without them. The optional libraries are Python modules that are needed only in special cases.

We've listed version numbers for the packages, and have tested release 4.2.2 of the Opus/UrbanSim code with those versions. Usually you should also be able to use more recent versions of the packages, except as specifically noted.

Caution! For binary versions of the packages, the package you need depends on the version of Python you are using. Be sure you have the right one. In most cases, the Python version number (e.g. 2.5) will be part of the filename.

Some of these packages are available for download from the third party software directory. (The advantage of getting the packages from the UrbanSim third-party directory is that we've tested the system with this particular set of versions.) We will also provide links to websites where they can be downloaded below.

In many cases, obtaining these packages is made simpler by the use of Easy Install, a Python module that can help you download and build Python packages. (However, also see the directions for the different platforms; sometimes it's better to use something other than Easy Install.) For more on Easy Install, visit the PEAK webpage.

Download to your computer. Run it (from the directory it's in) by typing

$ python

You can use Easy Install to download and install a package, or to install a package (either a *.egg file or a *.tar.gz) already downloaded to your computer. To install downloaded package, type the following at the command prompt:

$ easy_install [_filename_]

where [_filename_] is the path from your current location of the downloaded file.

Required Python Packages

  • numpy 1.0.4 is a fast array-processing library used throughout Opus. Version 1.0.4 is getting old -- there are some changes in the API in more recent versions of numpy, and not quite everything in the Opus/UrbanSim 4.2.2 release works with these newer versions. This is fixed in the development version and will be fixed in release 4.3.0. (You can probably use a more recent version for nearly everything even with 4.2.2; but be aware that there are at least a few unit tests that will fail, and hence a few things in the code that will break.)
  • scipy 0.6.0 is open-source software for mathematics, science, and engineering. Generally you need to get a version of scipy that is compatible with your numpy version. Opus needs the scipy.ndimage package. (If you have trouble installing scipy you can install just the ndimage packages.)
  • SQLAlchemy 0.4.5 allows programmatic access to a variety of database engines. Don't use the 0.5 branch.
  • Elixir 0.6.0 is a declarative layer on top of the SQLAlchemy library.
  • matplotlib 0.91.2 is a quite full-featured Python package for creating plots and graphs.
  • PyQt 4.4.4 (or greater) is a package that allows Python to interface with the Qt application framework to produce nice graphical user interfaces. This requires Qt to run. For windows, there is a downloadable *.exe file on the Riverbank Computing downloads page that contains Qt, PyQt, and everything to create the necessary bindings. For Mac and Linux, you will need to download and install Qt separately. There are more details on this on the Riverbank Computing webpage.
  • Mapnik 0.6.0 (or greater) is a free toolkit for developing mapping applications. This requires Boost to run. Mapnik installation instructions can be found here: Windows, Mac, Linux. Mac and Linux use a python-based build system called SCons to configure, build, and install Mapnik from source. Also, see Installation Troubleshooting for troubleshooting info.
  • Python Imaging Library 1.1.6 is a library that supports many file formats, and provides powerful image processing and graphics capabilities.
  • ImageMagick 6.5.3-0 is a software suite to create, edit, and compose bitmap images.

Recommended Python Packages

  • If you are using MySQL, install MySQL-python 1.2.2. This provides our connection from Python to MySQL. (If you will build this package from scratch, you will need to install the mysql-devel package, too.)

Optional Python Packages

  • If you are using R, install RPy. This is a Python interface for the statistical programming language R (tested with version 0.4.6).
  • If you need to use .dbf files (for example, those produced by ArcGIS), install dbfpy.

Installing Packages in a Virtual Environment

Consider installing your packages in a virtual Python environment for better isolation and local installation not requiring root privileges.

-- Main.KirillMueller - 26 Jan 2010

Topic revision: r5 - 26 Jan 2010 - 07:25:55 - KirillMueller
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback