installing numpy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cesco

    #1

    installing numpy

    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

  • Travis E. Oliphant

    #2
    Re: installing numpy

    cesco wrote:[color=blue]
    > Hi,
    >
    > I'm trying to install the numpy library (precisely
    > numpy-0.9.6-py2.4-linux-i686) on Linux but I encounter several[/color]

    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
    [color=blue]
    > 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[/color]

    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






    Comment

    Working...