FAQ
Hi,

I am trying to install NumPy on a RedHat 7.0 running python2.0.
Everything is in the standard places (I think!) and I picked up and
unzipped http://download.sourceforge.net/numpy/NumPy1711_20.zip into
/usr/local/lib/python2.0/site-packages. And set PYTHONPATH to
/usr/local/lib/python2.0/site-packages.

But don't seem to be able to get 'import Numeric' going.

Help


Nuzhet
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dalfes.vcf
Type: text/x-vcard
Size: 377 bytes
Desc: Card for Nuzhet Dalfes
Url : http://mail.python.org/pipermail/python-list/attachments/20010307/21b2dd74/attachment.vcf

Search Discussions

  • Warren Focke at Mar 7, 2001 at 1:30 am
    In article <3AA57C0D.BBC5E956 at itu.edu.tr>,
    Nuzhet Dalfes wrote:
    I am trying to install NumPy on a RedHat 7.0 running python2.0.
    Everything is in the standard places (I think!) and I picked up and
    unzipped http://download.sourceforge.net/numpy/NumPy1711_20.zip into
    That's for windos. You want to get Numeric-17.3.0.tar.gz, unpack it
    (not in site-packages, maybe in /usr/local/src or ~/src), cd to the
    directory it made, and follow the instructions there. Probably
    something like:

    /usr/local/bin/python2.0 setup.py install
    /usr/local/bin/python2.0 setup_all.py install

    Warren Focke
    --
    Wrapping up her appearance with rubber, you can feel more comfortable.
    -- directions for a set of Chinese binoculars
  • Nuzhet Dalfes at Mar 7, 2001 at 1:07 pm
    Thanks for suggestions from Warren and Christopher, but I get some sort
    of error related to some LONG_BIT issue.

    The output of my second trial of 'python setup.py install' is attached.

    I'll appreciate some more help; is this a known problem?

    Nuzhet


    Warren Focke wrote:
    In article <3AA57C0D.BBC5E956 at itu.edu.tr>,
    Nuzhet Dalfes wrote:
    I am trying to install NumPy on a RedHat 7.0 running python2.0.
    Everything is in the standard places (I think!) and I picked up and
    unzipped http://download.sourceforge.net/numpy/NumPy1711_20.zip into
    That's for windos. You want to get Numeric-17.3.0.tar.gz, unpack it
    (not in site-packages, maybe in /usr/local/src or ~/src), cd to the
    directory it made, and follow the instructions there. Probably
    something like:

    /usr/local/bin/python2.0 setup.py install
    /usr/local/bin/python2.0 setup_all.py install

    Warren Focke
    --
    Wrapping up her appearance with rubber, you can feel more comfortable.
    -- directions for a set of Chinese binoculars
    -------------- next part --------------
    In file included from /usr/local/include/python2.0/Python.h:54,
    from Src/_numpymodule.c:1:
    /usr/local/include/python2.0/pyport.h:390:2: #error "LONG_BIT definition appears wrong for platform (bad gcc config?)."
    running install
    running build
    running build_py
    not copying Lib/ArrayPrinter.py (output up-to-date)
    not copying Lib/Numeric.py (output up-to-date)
    not copying Lib/Precision.py (output up-to-date)
    not copying Lib/UserArray.py (output up-to-date)
    not copying Lib/numeric_version.py (output up-to-date)
    running build_ext
    building '_numpy' extension
    gcc -g -O2 -Wall -Wstrict-prototypes -fpic -IInclude -I/usr/local/include/python2.0 -c Src/_numpymodule.c -o build/temp.linux-i686-2.0/Src/_numpymodule.o
    error: command 'gcc' failed with exit status 1
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: dalfes.vcf
    Type: text/x-vcard
    Size: 377 bytes
    Desc: Card for Nuzhet Dalfes
    Url : http://mail.python.org/pipermail/python-list/attachments/20010307/7290c4dc/attachment.vcf
  • Warren Focke at Mar 8, 2001 at 10:17 pm
    Doesn't look familiar. I'd suggest rebuilding and reinstalling Python
    and NumPy now that you know which packages you need and what to do with
    them.

    w

    In article <3AA632AA.7D15888C at itu.edu.tr>,
    Nuzhet Dalfes wrote:
    I'll appreciate some more help; is this a known problem? [...]
    In file included from /usr/local/include/python2.0/Python.h:54,
    from Src/_numpymodule.c:1:
    /usr/local/include/python2.0/pyport.h:390:2: #error "LONG_BIT definition appears wrong for platform (bad gcc config?)." [...]
    gcc -g -O2 -Wall -Wstrict-prototypes -fpic -IInclude -I/usr/local/include/python2.0 -c Src/_numpymodule.c -o build/temp.linux-i686-2.0/Src/_numpymodule.o
    error: command 'gcc' failed with exit status 1
    --
    Wrapping up her appearance with rubber, you can feel more comfortable.
    -- directions for a set of Chinese binoculars
  • Christopher Lee at Mar 7, 2001 at 2:18 am
    "Nuzhet" == Nuzhet Dalfes <dalfes at itu.edu.tr> writes:
    Nuzhet> Hi,

    Nuzhet> I am trying to install NumPy on a RedHat 7.0 running python2.0.
    Nuzhet> Everything is in the standard places (I think!) and I picked up
    Nuzhet> and unzipped
    Nuzhet> http://download.sourceforge.net/numpy/NumPy1711_20.zip into
    Nuzhet> /usr/local/lib/python2.0/site-packages. And set PYTHONPATH to
    Nuzhet> /usr/local/lib/python2.0/site-packages.

    Numpy uses distutils for easy installation with python 2.0

    1. become root at the command line
    2. cd to the directory into which the Numeric package was unzipped. It
    should be called something like Numeric-17.1.1
    3. type:
    python setup.py install

    (This installs the core Numeric modules)

    4. Then type:
    python setup_all.py install

    (installs the additinal packages)

    You should be good-to-go. If you don't see the scripts setup.py and
    setup_all.py you are either in the wrong place or you have a broken
    distribution. If you get the chance, you might want to download 17.3.3;
    it has some bug fixes.
  • Harald Rosemann at Mar 7, 2001 at 10:27 am

    Christopher Lee wrote:
    "Nuzhet" == Nuzhet Dalfes <dalfes at itu.edu.tr> writes:
    Nuzhet> Hi,

    Nuzhet> I am trying to install NumPy on a RedHat 7.0 running python2.0.
    Nuzhet> Everything is in the standard places (I think!) and I picked up
    Nuzhet> and unzipped
    Nuzhet> http://download.sourceforge.net/numpy/NumPy1711_20.zip into
    Nuzhet> /usr/local/lib/python2.0/site-packages. And set PYTHONPATH to
    Nuzhet> /usr/local/lib/python2.0/site-packages.

    Numpy uses distutils for easy installation with python 2.0

    1. become root at the command line
    2. cd to the directory into which the Numeric package was unzipped. It
    should be called something like Numeric-17.1.1
    3. type:
    python setup.py install

    (This installs the core Numeric modules)

    4. Then type:
    python setup_all.py install

    (installs the additinal packages)

    You should be good-to-go. If you don't see the scripts setup.py and
    setup_all.py you are either in the wrong place or you have a broken
    distribution. If you get the chance, you might want to download 17.3.3;
    it has some bug fixes.

    I tried to install Numeric-17.3.0 by:
    python setup.py install
    on SuSE-Linux 7.1.

    Got the error message:
    ....
    gcc -O2 -m486 -fpic -IInclude -I/usr/include/python2.0 -c
    Src/_numpymodule.c -o build/temp.linux-i686-2.0/Src/_numpymodu
    Src/_numpymodule.c:1: Python.h: No such file or directory
    error: command 'gcc' failed with exit status 1
    ....


    In Python-2.0 I found:
    Python-2.0/Include/Python.h
    but that doesn't seem to work.

    What's wrong here?
    Many thanks!

    Harald Rosemann
  • Christopher Lee at Mar 7, 2001 at 1:00 pm
    "Harald" == Harald Rosemann <rosemann at imkt.uni-hannover.de> writes:
    Harald> Christopher Lee wrote:
    "Nuzhet" == Nuzhet Dalfes <dalfes at itu.edu.tr> writes:
    Harald> Got the error message: .... gcc -O2 -m486 -fpic -IInclude
    Harald> -I/usr/include/python2.0 -c Src/_numpymodule.c -o
    ^^^^^^^^^^^^^^^^^^^^^^^
    Harald> build/temp.linux-i686-2.0/Src/_numpymodu Src/_numpymodule.c:1:
    Harald> Python.h: No such file or directory error: command 'gcc' failed
    Harald> with exit status 1 ....


    Harald> In Python-2.0 I found: Python-2.0/Include/Python.h but that
    Harald> doesn't seem to work.

    It sounds like Suse may not install the headers where python expects, or if
    you installed from source, perhaps you didn't do a "make install" ? I
    can't tell based upon your description but either way...


    I would:

    - check to see if the directory /usr/include/python2.0 exists
    and create it if it doesn't exist yet

    - copy all the files that you found in Python-2.0/Include to
    /usr/include/python2.0. This should allow the compiler to find
    Python.h using the -I/usr/include/python2.0 flag.

    - try "python setup.py install" again


    good luck

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 7, '01 at 12:08a
activeMar 8, '01 at 10:17p
posts7
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase