Really not an expert here, but it looks like it's trying various
compilation options, some work and some don't, and for some reason
it's really unhappy about the one where it can't find Python.h.
Maybe add /usr/include/python2.6 to your CPATH, see if that helps (and
make sure permissions are correctly set on this directory)? However,
it may very well be something else....
-=- Olivier
Le 14 février 2012 03:44, Martin Raspaud <[email protected]
<mailto:[email protected]>> a écrit :
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I am trying to compile numpy 1.6.1 from source on a Redhat Linux
enterprise 6 machine, and I get a problem with Python.h : somehow it
can't be located by numpy's install script:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install
python-dev|python-devel.
Now, the trick is that python-devel IS installed:
bash-4.1$ rpm -qa | grep python-dev
python-devel-2.6.6-29.el6.x86_64
and Python.h is logically in /usr/include/python2.6
Anyone got a clue ?
The full log is included below.
Best regards,
Martin
bash-4.1$ python setup.py build --fcompiler=gnu95
Running from numpy source directory.non-existing path in
'numpy/distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in /usr/local/lib64
libraries mkl,vml,guide not found in /usr/local/lib
libraries mkl,vml,guide not found in /usr/lib64
libraries mkl,vml,guide not found in /usr/lib
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib64
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64/atlas
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64/sse2
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/sse2
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in /usr/local/lib64
libraries f77blas,cblas,atlas not found in /usr/local/lib
libraries f77blas,cblas,atlas not found in /usr/lib64/atlas
libraries f77blas,cblas,atlas not found in /usr/lib64/sse2
libraries f77blas,cblas,atlas not found in /usr/lib64
libraries f77blas,cblas,atlas not found in /usr/lib/sse2
libraries f77blas,cblas,atlas not found in /usr/lib
NOT AVAILABLE
/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/system_info.py:1414:
UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
libraries blas not found in /usr/local/lib64
libraries blas not found in /usr/local/lib
libraries blas not found in /usr/lib64
libraries blas not found in /usr/lib
NOT AVAILABLE
/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/system_info.py:1423:
UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
NOT AVAILABLE
/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/system_info.py:1426:
UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
NOT AVAILABLE
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in /usr/local/lib64
libraries mkl,vml,guide not found in /usr/local/lib
libraries mkl,vml,guide not found in /usr/lib64
libraries mkl,vml,guide not found in /usr/lib
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib64
libraries lapack_atlas not found in /usr/local/lib64
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/local/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64/atlas
libraries lapack_atlas not found in /usr/lib64/atlas
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64/sse2
libraries lapack_atlas not found in /usr/lib64/sse2
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
libraries lapack_atlas not found in /usr/lib64
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/sse2
libraries lapack_atlas not found in /usr/lib/sse2
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in /usr/local/lib64
libraries lapack_atlas not found in /usr/local/lib64
libraries f77blas,cblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/local/lib
libraries f77blas,cblas,atlas not found in /usr/lib64/atlas
libraries lapack_atlas not found in /usr/lib64/atlas
libraries f77blas,cblas,atlas not found in /usr/lib64/sse2
libraries lapack_atlas not found in /usr/lib64/sse2
libraries f77blas,cblas,atlas not found in /usr/lib64
libraries lapack_atlas not found in /usr/lib64
libraries f77blas,cblas,atlas not found in /usr/lib/sse2
libraries lapack_atlas not found in /usr/lib/sse2
libraries f77blas,cblas,atlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/system_info.py:1330:
UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
libraries lapack not found in /usr/local/lib64
libraries lapack not found in /usr/local/lib
libraries lapack not found in /usr/lib64
libraries lapack not found in /usr/lib
NOT AVAILABLE
/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/system_info.py:1341:
UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
NOT AVAILABLE
/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/system_info.py:1344:
UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
warnings.warn(LapackSrcNotFoundError.__doc__)
NOT AVAILABLE
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands
- --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands
- --fcompiler options
running build_src
build_src
building py_modules sources
building library "npymath" sources
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
customize Gnu95FCompiler using config
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
- -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
- --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
- -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions
- -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
- -D_GNU_SOURCE -fPIC -fwrapv -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src
-Inumpy/core
- -Inumpy/core/src/npymath -Inumpy/core/src/multiarray
- -Inumpy/core/src/umath -Inumpy/core/include -c'
gcc: _configtest.c
gcc -pthread _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
- -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
- --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
- -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions
- -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
- -D_GNU_SOURCE -fPIC -fwrapv -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src
-Inumpy/core
- -Inumpy/core/src/npymath -Inumpy/core/src/multiarray
- -Inumpy/core/src/umath -Inumpy/core/include -c'
gcc: _configtest.c
_configtest.c:1: warning: conflicting types for built-in function
'exp'
gcc -pthread _configtest.o -o _configtest
_configtest.o: In function `main':
/data/proj/safutv/src/numpy-1.6.1/_configtest.c:6: undefined reference
to `exp'
collect2: ld returned 1 exit status
_configtest.o: In function `main':
/data/proj/safutv/src/numpy-1.6.1/_configtest.c:6: undefined reference
to `exp'
collect2: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
- -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
- --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
- -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions
- -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
- -D_GNU_SOURCE -fPIC -fwrapv -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src
-Inumpy/core
- -Inumpy/core/src/npymath -Inumpy/core/src/multiarray
- -Inumpy/core/src/umath -Inumpy/core/include -c'
gcc: _configtest.c
_configtest.c:1: warning: conflicting types for built-in function
'exp'
gcc -pthread _configtest.o -lm -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
building extension "numpy.core._sort" sources
Generating
build/src.linux-x86_64-2.6/numpy/core/include/numpy/config.h
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
- -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
- --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
- -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions
- -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
- -D_GNU_SOURCE -fPIC -fwrapv -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src
-Inumpy/core
- -Inumpy/core/src/npymath -Inumpy/core/src/multiarray
- -Inumpy/core/src/umath -Inumpy/core/include -c'
gcc: _configtest.c
_configtest.c:1:20: error: Python.h: No such file or directory
_configtest.c:1:20: error: Python.h: No such file or directory
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
File "setup.py", line 196, in <module>
setup_package()
File "setup.py", line 189, in setup_package
configuration=configuration )
File "/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/core.py",
line 186, in setup
return old_setup(**new_attr)
File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.6/distutils/dist.py", line 975, in
run_commands
self.run_command(cmd)
File "/usr/lib64/python2.6/distutils/dist.py", line 995, in
run_command
cmd_obj.run()
File
"/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/command/build.py",
line 37, in run
old_build.run(self)
File "/usr/lib64/python2.6/distutils/command/build.py", line 134,
in run
self.run_command(cmd_name)
File "/usr/lib64/python2.6/distutils/cmd.py", line 333, in
run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.6/distutils/dist.py", line 995, in
run_command
cmd_obj.run()
File
"/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/command/build_src.py",
line 152, in run
self.build_sources()
File
"/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/command/build_src.py",
line 169, in build_sources
self.build_extension_sources(ext)
File
"/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/command/build_src.py",
line 328, in build_extension_sources
sources = self.generate_sources(sources, ext)
File
"/data/proj6/safutv/src/numpy-1.6.1/numpy/distutils/command/build_src.py",
line 385, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 410, in generate_config_h
moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
File "numpy/core/setup.py", line 41, in check_types
out = check_types(*a, **kw)
File "numpy/core/setup.py", line 271, in check_types
"Cannot compile 'Python.h'. Perhaps you need to "\
SystemError: Cannot compile 'Python.h'. Perhaps you need to install
python-dev|python-devel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPOh8EAAoJEBdvyODiyJI4umMIAOQOxNPK5XdQIV7scjtALh9L
g71eIIZcqjvZ9LOwOaYaWA2jx+PqQ0yGu+vWsJ3Rk7WumffnM2wZAXww3lgcs8Jm
MBcosmML5O5bFHagUG2VrrmB8stV8sTWdbV+8vf/7me8tIuPgLIUb4no/oaAjNPu
o7ZgyQI/FIEyCbtYM8vgvbFu7XKal9nkHHPZ4hXviDHsa1adtJjjhsWfjf8Rcins
us3Wr43ErUbFEWfDGGl4EMaTBaR0KjiVxLCFLq9g4MXxfmdCL7lrgl7oq8itP4lt
MqC2BEHLo8qs4PLmkOImelknu+6wINor61Iwa/1atFTqRLB0WPOLJZvA2sTTT3U=
=OXPR
-----END PGP SIGNATURE-----
_______________________________________________
NumPy-Discussion mailing list
[email protected] <mailto:[email protected]>
http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion