using libraries not installed on campus computers (numpy)

David Cournapeau cournape at
Tue Jun 9 13:29:52 CEST 2009

On Tue, Jun 9, 2009 at 7:40 PM, Chandramouli<naruvimama at> wrote:
> I built and installed Numpy on my campus account, the install couldn't
> be done on the python install location. So I did it on my local
> storage location but I am clueless about how to use it I was expecting
> to see a in the install dir
> so I could I suppose just give
> import <path to install loc>numpy
> and expect it to work like normal but I am not sure how this works

python expects to find modules (such as numpy) into a list of
directories, some of which are hardcoded at installation time for
python. You can prepend a directory (or a set of directories) using
the PYTHONPATH environment variable.

For example, installing numpy insto $HOME/local:

python install --prefix=$HOME/local

numpy will be installed in $HOME/local/lib/python2.5/site-packages
(for python 2.5), and you should set your PYTHONPATH to
$HOME/local/lib/python2.5/site-packages for python to find it:

PYTHONPATH=$HOME/local/lib/python2.5/site-packages:$PYTHONPATH python
-c "import numpy"


More information about the Python-list mailing list