[Numpy-discussion] Numpy not working (revised)

Travis Oliphant oliphant.travis at ieee.org
Wed Jul 5 23:48:18 EDT 2006


Satellite Data Research Group wrote:
> Dear all
>
> I am trying to get numpy working with MacOSX 10.4 on an intel 
> processor.  I had it working for Python2.3.5, but after installing 
> Python 2.4 it didn't work on either python version.
>
> After inputing:
> sudo python setup.py build
> and then
> sudo python setup.py install
>
> and also trying to load up a basic array, I get the following errors.
> The errors that I get repeatedly during the installation process seem 
> to mainly be (without showing you the entire massive output, unless you 
> need to see it):
>
>
> building extension "numpy.core.umath" sources
>   adding 'build/src.darwin-8.7.1-i386-2.3/numpy/core/config.h' to sources.
>   adding 'build/src.darwin-8.7.1-i386-2.3/numpy/core/__ufunc_api.h' to sources.
>   adding 'build/src.darwin-8.7.1-i386-2.3/numpy/core/src' to include_dirs.
> numpy.core - nothing done with h_files= 
> ['build/src.darwin-8.7.1-i386-2.3/numpy/core/config.h', 
> 'build/src.darwin-8.7.1-i386-2.3/numpy/core/__multiarray_api.h', 
> 'build/src.darwin-8.7.1-i386-2.3/numpy/core/__ufunc_api.h']
>
> building extension "numpy.core._dotblas" sources
>   adding 'numpy/core/blasdot/_dotblas.c' to sources.
> building extension "numpy.lib._compiled_base" sources
> building extension "numpy.dft.fftpack_lite" sources
> building extension "numpy.linalg.lapack_lite" sources
>   adding 'numpy/linalg/lapack_litemodule.c' to sources.
> building extension "numpy.random.mtrand" sources
> customize NAGFCompiler
> customize AbsoftFCompiler
> customize IbmFCompiler
> Could not locate executable g77
> Could not locate executable f77
> Could not locate executable gfortran
> Could not locate executable f95
>
> customize GnuFCompiler
> customize Gnu95FCompiler
> customize G95FCompiler
> customize GnuFCompiler
> customize Gnu95FCompiler
> customize NAGFCompiler
> customize NAGFCompiler using config
> gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp 
> -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall 
> -Wstrict-prototypes'
> compile options: '-Inumpy/core/src -Inumpy/core/include 
> -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 
> -c'
> gcc: _configtest.c
>
> _configtest.c:7:2: error: #error No _WIN32
> _configtest.c:7:2: error: #error No _WIN32
>
> The above lines of output are repeated a few times.  If it makes any 
> difference, which I am sure that it does, I am running on an intel chip.
>
>   
This is not a problem.  These are "configuration" "error" that the 
system uses to incorporate platform-specific code.


> In Python, when typing
>   
>>>> from numpy import *
>>>>         
> I get:
> Running from numpy source directory.
>
>   
This is the problem.   The error is telling you that you can't import 
numpy from the directory where numpy was built (the import mechanism 
gets confused between the system-installed numpy and the directory 
structure underneath).

Just exit Python and cd to another directory.   Then numpy should work 
fine.

-Travis





More information about the NumPy-Discussion mailing list