hi, everybody,
I have a problem when " brew install biobakery/biobakery/humann2"
looks like the 'python2' can NOT find the python.h
the system is CentOS 6.5
I have searched
#14
numpy: builds and installs after standalone brew
thefuck depends python-dev and psutil => :python
Executing "brew install biobakery_tool_suite" results in Python.h error #2
but can NOT find the reason.
below is the install log , env , and the file 's location.
1.install log
2.brew config
3.which python2
4.the Python.h 's location
5. the libpython2.7.so 's location
--------------1.install log :------------
==> Downloading https://pypi.python.org/packages/43/07/ec41577c3c1f9b578875ade8ed549d14fc2944c13cb7504579d542b62a69/humann2-0.11.1.tar.gz
Already downloaded: /home/test/.cache/Homebrew/humann2-0.11.1.tar.gz
==> Downloading https://pypi.python.org/packages/67/ab/41e4b42e0519d868347d2cf1051a05ce0170632039c053dee8ffe8b43b0b/numpy-1.8.2.tar.gz
Already downloaded: /home/test/.cache/Homebrew/humann2--numpy-1.8.2.tar.gz
==> python2 -c import setuptools... --no-user-cfg install --prefix=/home/test/.linuxbrew/Cellar/humann2/0.11.1/libexec --single-version-externally-managed --record=installed.txt
Last 15 lines from /home/test/.cache/Homebrew/Logs/humann2/01.python2:
File "/tmp/humann2--numpy-20180314-25181-13t03la/numpy-1.8.2/numpy/distutils/command/build_src.py", line 153, in run
self.build_sources()
File "/tmp/humann2--numpy-20180314-25181-13t03la/numpy-1.8.2/numpy/distutils/command/build_src.py", line 170, in build_sources
self.build_extension_sources(ext)
File "/tmp/humann2--numpy-20180314-25181-13t03la/numpy-1.8.2/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/tmp/humann2--numpy-20180314-25181-13t03la/numpy-1.8.2/numpy/distutils/command/build_src.py", line 386, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 428, in generate_config_h
moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
File "numpy/core/setup.py", line 42, in check_types
out = check_types(*a, **kw)
File "numpy/core/setup.py", line 289, 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.
------------ 2.brew config -------------
HOMEBREW_VERSION: >=1.4.0 (shallow or no git repository)
ORIGIN: https://github.com/Linuxbrew/brew
HEAD: 42f6c7af3280bbf4329272e708d5710500c02fee
Last commit: 7 days ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: 241a09f87d0978518840ece6062402b72e6d5953
Core tap last commit: 10 hours ago
HOMEBREW_PREFIX: /home/test/.linuxbrew
HOMEBREW_REPOSITORY: /home/test/.linuxbrew/Homebrew
HOMEBREW_CELLAR: /home/test/.linuxbrew/Cellar
HOMEBREW_BUILD_FROM_SOURCE: 1
HOMEBREW_CACHE: /home/test/.cache/Homebrew
HOMEBREW_CELLAR: /home/test/.linuxbrew/Cellar
HOMEBREW_MAKE_JOBS: 1
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
HOMEBREW_PREFIX: /home/test/.linuxbrew
HOMEBREW_REPOSITORY: /home/test/.linuxbrew/Homebrew
HOMEBREW_RUBY_WARNINGS: -W0
CPU: single-core 64-bit sandybridge
Homebrew Ruby: 2.3.3 => /home/test/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: N/A
Git: 2.16.2 => /home/test/.linuxbrew/bin/git
Curl: 7.19.7 => /usr/bin/curl
Perl: /home/test/.linuxbrew/bin/perl => /home/test/.linuxbrew/Cellar/perl/5.26.1_1/bin/perl
Python: /home/test/.linuxbrew/opt/python/libexec/bin/python => /home/test/.linuxbrew/Cellar/python/3.6.4_5/bin/python3.6
Ruby: /usr/bin/ruby
Java: N/A
Kernel: Linux 2.6.32-696.18.7.1.el6.ucloud.x86_64 x86_64 GNU/Linux
OS: CentOS release 6.5 (Final)
Host glibc: 2.12
/usr/bin/gcc: 4.4.7
glibc: 2.23
gcc: 5.5.0_1
xorg: N/A
------------ 3. which python2 ------------
which python2
~/.linuxbrew/bin/python2
--------- 4.the Python.h 's location ---------
ls -l .linuxbrew/include/python2.7/Python.h
-rw-r--r-- 1 test test 4329 Mar 12 18:35 .linuxbrew/include/python2.7/Python.h
---------- 5. the libpython2.7.so 's location --------
ls .linuxbrew/lib/libpython2.7.so -l
lrwxrwxrwx 1 test test 47 Mar 12 18:35 .linuxbrew/lib/libpython2.7.so -> ../Cellar/python@2/2.7.14_4/lib/libpython2.7.so
what I have try:
##2
Executing "brew install biobakery_tool_suite" results in Python.h error #2 said we can use " yum install python-devel " to solved this problem . I have tried , but fail .
" brew install biobakery/biobakery/humann2" 's output is the same error.
another try: try install /home/test/.cache/Homebrew/humann2--numpy-1.8.2.tar.gz to see the error detial.
cd /home/test/.cache/Homebrew/
tar xzvf humann2--numpy-1.8.2.tar.gz
cd numpy-1.8.2
python setupegg.py install
------------install log ----------
python setupegg.py install
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 ['/home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
openblas_info:
libraries not found in ['/home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['/home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['/home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/system_info.py:1521: 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:
FOUND:
libraries = ['blas']
library_dirs = ['/usr/lib64']
language = f77
FOUND:
libraries = ['blas']
library_dirs = ['/usr/lib64']
define_macros = [('NO_ATLAS_INFO', 1)]
language = f77
non-existing path in 'numpy/lib': 'benchmarks'
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['/home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in /home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib
libraries lapack_atlas not found in /home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib
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/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
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 /home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib
libraries lapack_atlas not found in /home/test/.linuxbrew/bin/../Cellar/python@2/2.7.14_4/lib
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/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
libraries lapack_atlas not found in /usr/lib
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/system_info.py:1427: 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:
FOUND:
libraries = ['lapack']
library_dirs = ['/usr/lib64']
language = f77
FOUND:
libraries = ['lapack', 'blas']
library_dirs = ['/usr/lib64']
define_macros = [('NO_ATLAS_INFO', 1)]
language = f77
/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
running build_src
build_src
building py_modules sources
creating build
creating build/src.linux-x86_64-2.7
creating build/src.linux-x86_64-2.7/numpy
creating build/src.linux-x86_64-2.7/numpy/distutils
building library "npymath" sources
customize Gnu95FCompiler
Found executable /home/test/.linuxbrew/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using config
C compiler: gcc-5 -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -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/src/npysort -Inumpy/core/include -c'
gcc-5: _configtest.c
gcc-5 -pthread _configtest.o -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
C compiler: gcc-5 -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -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/src/npysort -Inumpy/core/include -c'
gcc-5: _configtest.c
_configtest.c:1:5: warning: conflicting types for built-in function 'exp'
int exp (void);
^
gcc-5 -pthread _configtest.o -o _configtest
_configtest.o: In function main': /home/test/.cache/Homebrew/numpy-1.8.2/_configtest.c:6: undefined reference to
exp'
collect2: error: ld returned 1 exit status
_configtest.o: In function main': /home/test/.cache/Homebrew/numpy-1.8.2/_configtest.c:6: undefined reference to
exp'
collect2: error: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
C compiler: gcc-5 -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -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/src/npysort -Inumpy/core/include -c'
gcc-5: _configtest.c
_configtest.c:1:5: warning: conflicting types for built-in function 'exp'
int exp (void);
^
gcc-5 -pthread _configtest.o -lm -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
creating build/src.linux-x86_64-2.7/numpy/core
creating build/src.linux-x86_64-2.7/numpy/core/src
creating build/src.linux-x86_64-2.7/numpy/core/src/npymath
conv_template:> build/src.linux-x86_64-2.7/numpy/core/src/npymath/npy_math.c
conv_template:> build/src.linux-x86_64-2.7/numpy/core/src/npymath/ieee754.c
conv_template:> build/src.linux-x86_64-2.7/numpy/core/src/npymath/npy_math_complex.c
building library "npysort" sources
creating build/src.linux-x86_64-2.7/numpy/core/src/npysort
conv_template:> build/src.linux-x86_64-2.7/numpy/core/src/npysort/quicksort.c
conv_template:> build/src.linux-x86_64-2.7/numpy/core/src/npysort/mergesort.c
conv_template:> build/src.linux-x86_64-2.7/numpy/core/src/npysort/heapsort.c
creating build/src.linux-x86_64-2.7/numpy/core/src/private
conv_template:> build/src.linux-x86_64-2.7/numpy/core/src/private/npy_partition.h
adding 'build/src.linux-x86_64-2.7/numpy/core/src/private' to include_dirs.
conv_template:> build/src.linux-x86_64-2.7/numpy/core/src/npysort/selection.c
None - nothing done with h_files = ['build/src.linux-x86_64-2.7/numpy/core/src/private/npy_partition.h']
building extension "numpy.core._dummy" sources
Generating build/src.linux-x86_64-2.7/numpy/core/include/numpy/config.h
C compiler: gcc-5 -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -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/src/npysort -Inumpy/core/include -c'
gcc-5: _configtest.c
_configtest.c:1:20: fatal error: Python.h: No such file or directory
compilation terminated.
_configtest.c:1:20: fatal error: Python.h: No such file or directory
compilation terminated.
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
File "setupegg.py", line 25, in
exec(compile(open('setup.py').read(), 'setup.py', 'exec'))
File "setup.py", line 239, in
setup_package()
File "setup.py", line 231, in setup_package
setup(**metadata)
File "/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/site-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/command/install.py", line 59, in run
r = self.setuptools_run()
File "/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/command/install.py", line 53, in setuptools_run
self.do_egg_install()
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 163, in run
self.run_command("egg_info")
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/command/egg_info.py", line 10, in run
self.run_command("build_src")
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/home/test/.linuxbrew/Cellar/python@2/2.7.14_4/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/command/build_src.py", line 153, in run
self.build_sources()
File "/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/command/build_src.py", line 170, in build_sources
self.build_extension_sources(ext)
File "/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/home/test/.cache/Homebrew/numpy-1.8.2/numpy/distutils/command/build_src.py", line 386, in generate_sources
source = func(extension, build_dir)
File "numpy/core/setup.py", line 428, in generate_config_h
moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
File "numpy/core/setup.py", line 42, in check_types
out = check_types(*a, **kw)
File "numpy/core/setup.py", line 289, 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.
still can NOT find the reason.
can anyone help ?