How do I install a python module for use on Linux systems at SEAS?

This article assumes you are logged into a CETS managed Linux machine (Eniac, a lab machine, graduate workstation, etc).

These first two steps only need to be done once.

  1. Append your .bash_profile so PYTHONPATH includes ~/lib/python2.7/site-packages/ like this:
    echo export PYTHONPATH='$PYTHONPATH':~/lib/python2.7/site-packages/ >> ~/.bash_profile
  2. Run this command to update the PYTHONPATH for the current session:
    export PYTHONPATH=~/lib/python2.7/site-package
These steps can repeated to install as many modules as you need.
  1. Download and untar or unzip the module you would like to install.
  2. CD into the module directory that contains setup.py and run the install:
    python setup.py install --prefix=~

If you have any questions, please email cets@seas.upenn.edu.

© Computing and Educational Technology Services | Report a Problem
cets@seas.upenn.edu | 215.898.4707