Installing Personal Python Modules

Revision as of 13:24, 4 October 2022 by Cabreraruizdiazj (talk | contribs)
Jump to navigation Jump to search


If you need a python module or a python-based application installed for regular use the best choice is to open a support ticket. However, sometimes it is necessary to install a small personal python module or a software package that is not of production quality whether it is too new, buggy, or otherwise unsuitable for general use. In such cases use this guide to install a small personal python module or a python-based software package that is packaged with distutils i.e. you install it with 'python install' in your home directory.

Alternate Location Install

The first step is to install the software into a non-standard location. With when installing software packaged with distutils this is most often accomplished by specifying the '--home' argument to the script. For example,

$ module load python/2.7.6
$ python install --home=$HOME/python/2.7.6

Making Software Available

Once the software is installed it is necessary to make it available within your shell environment. Assuming that both python modules and executable scripts were installed the following variables would need to be changed:

Change Shell Environment Directly


export PYTHONPATH=$PYTHONPATH:${HOME}/python/2.7.6/lib/python


export PATH=$PATH:${HOME}/python/2.7.6/bin

Write Personal Environment Module

See the Personal Modules Section to get started.

Managing Python Environments

See Managing Python environments and Jupyter kernels


  • Validated 4/5/2018