installing numpy

C

cesco

Hi,

I'm trying to install the numpy library (precisely
numpy-0.9.6-py2.4-linux-i686) on Linux but I encounter several
problems.
After unpacking the file it creates the following folders:
usr/lib/python2.4/site-packages/numpy/
The file setup.py and the whole library is located under the folder
numpy.
If, from the location where I unpacked the file, I run the command
python usr/lib/python2.4/site-packages/numpy/setup.py install
I receive the following error:
Traceback (most recent call last):
File "usr/lib/python2.4/site-packages/numpy/setup.py", line 24, in ?
sys.path.remove(os.getcwd())
ValueError: list.remove(x): x not in list
If, instead, I do
cd usr/lib/python2.4/site-packages/numpy/
and then
python setup.py install
I receive the following error
Traceback (most recent call last):
File "setup.py", line 26, in ?
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core
Finally I tried to move the folder numpy to the location where all the
third-party modules are installed, that in my case is
/usr/lib/python2.4/site-packages/ and run the command from there like:
python numpy/setup.py install
but, once again, I receive the error:
Traceback (most recent call last):
File "numpy/setup.py", line 26, in ?
from numpy.distutils.core import setup
ImportError: No module named numpy.distutils.core

Does anyone know how this module should be installed?

Thanks and regards
Cesco
 
T

Travis E. Oliphant

cesco said:
Hi,

I'm trying to install the numpy library (precisely
numpy-0.9.6-py2.4-linux-i686) on Linux but I encounter several

This is a dumb pre-built binary package (useful perhaps because it links
against ATLAS already) built using distutils.

You don't build it and install it using setup.py you just un-tar it in
the / directory and start using it.

You only run python setup.py install when you have a source file. You
can download the sources if you want and build it yourself using:

python setup.py install
Finally I tried to move the folder numpy to the location where all the
third-party modules are installed, that in my case is
/usr/lib/python2.4/site-packages/ and run the command from there like:
python numpy/setup.py install

Presumably, you can copy the files directly there and then start using
it (don't run setup.py though, there is no need).

After copying the files over to your site-packages directory, just start
python and do

import numpy


-Travis
 

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

Forum statistics

Threads
473,770
Messages
2,569,585
Members
45,081
Latest member
AnyaMerry

Latest Threads

Top