Difference between revisions of "Installing Personal Python Modules"

From UFRC
Jump to navigation Jump to search
(Created page with "Category:Python =Introduction= If you need a python module or a python-based application installed for regular use the best choice is to open a [http://support.rc.ufl.edu...")
 
Line 20: Line 20:
 
==Write Personal Environment Module==
 
==Write Personal Environment Module==
 
See the [[Modules|Personal Modules Section]] to get started.
 
See the [[Modules|Personal Modules Section]] to get started.
 +
=Validation=
 +
* Validated 4/5/2018

Revision as of 19:19, 5 April 2018

Introduction

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 setup.py 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 setup.py script. For example,

$ module load python/2.7.6
$ python setup.py 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

Modules:

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

Executables:

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

Write Personal Environment Module

See the Personal Modules Section to get started.

Validation

  • Validated 4/5/2018