using libraries not installed on campus computers (numpy)

C

Chandramouli

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 numpy.py 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
 
D

David Cournapeau

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 numpy.py 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 setup.py 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"

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top