[Numpy-discussion] Numpy compilation error

Robert Kern robert.kern@gmail....
Sun Apr 18 18:06:54 CDT 2010


On Sun, Apr 18, 2010 at 13:32, Pradeep Jha <jhapk@utias.utoronto.ca> wrote:
> Hi,
>
> I am running python 2.4.4. I installed numpy using the command
>
> python setup.py install --prefix=$HOME/bin

That's not a good prefix. --prefix=$HOME would be better. It will
create, if necessary, bin/ and lib/ underneath that.

> my site-packages directory got installed to the following address:
>
> /nfs/carv/d1/people/pradeep/bin/lib/python2.4
>
> in my preconfig file I changed the path to the following as you recommended
>
> # If numpy was installed using the --home option, set this to the
> # home directory for numpy. This will be needed for all numpy installations
> # that don't put the include files into python's native include directory.
> NUMPY_HOME=${NUMPY_HOME:="/nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include"}
>
> I still get the following warning message when I run the preconfig file:
> checking for python2... /usr/bin/python2
> Python command set by configure to  /usr/bin/python2
> WARNING: NUMPY include dir
> /nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/include/python
> does not exist.
> setting NUMPY_INC_DIR to
> /nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/include/python
>
> Whats going wrong? The warning is right, as there is no directory called
> python  on that address.

You need to set the variable NUMPY_INC_DIR to
'/nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/'
or the equivalent if you decide to fix the --prefix as above.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the NumPy-Discussion mailing list