[Numpy-discussion] Problems installing not as root

Robert Kern rkern at ucsd.edu
Mon Jun 7 14:36:04 CDT 2004

Ryan Gutenkunst wrote:
> Hi all,
> I'm trying to install Numerical Python without root access, and I'm 
> having great difficulty.

Ryan! Long time, no see. Good to see you're joining in on the Python fun.

> I'm running Python 2.2.2 (which was installed systemwide by root). I 
> used 'python setup.py install --prefix ~/installed' to install numpy and 
> I have ~/installed/lib/python2.2/site-packages in my PYTHONPATH.
> Initially 'import' was failing, but  creating an empty __init.py__ in 
> site-packages/Numeric seems to have fixed that. 

No good. Numeric isn't a package (in the technical sense of a collection 
of modules all in a directory that has an __init__.py, etc.).

Check for the existence of the file 
~/installed/lib/python2.2/site-packages/Numeric.pth . It should have one 
line saying, "Numeric". When the interpreter starts up, it scans what's 
in the PYTHONPATH and the defaults paths. When it encounters .pth files, 
it automatically adds the paths named in them to the PYTHONPATH.

You can also try adding ~/installed/lib/python2.2/site-packages/Numeric 
directly to your PYTHONPATH.

If you have more problems, you can contact me off-list; I'll take care 
of you.

Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

More information about the Numpy-discussion mailing list