我试图在centos上使用pip安装软件包(例如matplotlib,numpy),但出现错误,我已经安装了python-devel,openssl-devel,并且已经更新了pip和setuptools(33.1.1或40.0.2)。 python版本是2.7.15。错误信息很长,请耐心等待,非常感谢
Collecting matplotlib
Complete output from command python setup.py egg_info:
Running from numpy source directory.
/tmp/easy_install-WPJbWM/numpy-1.15.1/setup.py:378: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
/tmp/easy_install-WPJbWM/numpy-1.15.1/numpy/distutils/system_info.py:625: 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.
self.calc_info()
/bin/sh: svnversion: command not found
/bin/sh: svnversion: command not found
/home/work/xxxx/app/python2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [2.2.3]
python: yes [2.7.15 (default, Nov 13 2018, 11:55:34) [GCC
3.4.5 20051201 (Red Hat 3.4.5-2)]]
platform: yes [linux2]
_configtest.c:1:5: warning: conflicting types for built-in function 'exp' [enabled by default]
int exp (void);
^
_configtest.o: In function `main':
/tmp/easy_install-WPJbWM/numpy-1.15.1/_configtest.c:6: undefined reference to `exp'
xxxx
_configtest.o: In function `main':
/tmp/easy_install-WPJbWM/numpy-1.15.1/_configtest.c:6: undefined reference to `exp'
xxxx
_configtest.c:1:5: warning: conflicting types for built-in function 'exp' [enabled by default]
int exp (void);
^
_configtest.c:3:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
main()
^
File: build/src.linux-x86_64-2.7/numpy/core/include/numpy/_numpyconfig.h
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
warning: no previously-included files matching '*.bak' found anywhere in distribution
warning: no previously-included files matching '*~' found anywhere in distribution
numpy/core/src/npymath/npy_math_complex.c.src: In function 'npy_casinhf':
^
/home/work/gcc/opt/binutils/bin/ld: skipping incompatible /usr/lib/liblapack.so when searching for -llapack
/home/work/gcc/opt/binutils/bin/ld: skipping incompatible /usr/lib/liblapack.a when searching for -llapack
/home/work/gcc/opt/binutils/bin/ld: cannot find -llapack
/home/work/gcc/opt/binutils/bin/ld: skipping incompatible /usr/lib/liblapack.so when searching for -llapack
/home/work/gcc/opt/binutils/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/home/work/gcc/opt/binutils/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/home/work/gcc/opt/binutils/bin/ld: skipping incompatible /usr/lib/libc_nonshared.a when searching for libc_nonshared.a
xxxx
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-j9VASQ/matplotlib/setup.py", line 278, in <module>
**extra_args
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/__init__.py", line 139, in setup
_install_setup_requires(attrs)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/__init__.py", line 134, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/dist.py", line 514, in fetch_build_eggs
replace_conflicting=True,
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 777, in resolve
replace_conflicting=replace_conflicting
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1060, in best_match
return self.obtain(req, installer)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1072, in obtain
return installer(requirement)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/dist.py", line 581, in fetch_build_egg
return cmd.easy_install(req)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 676, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 702, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 887, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1155, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/work/xxxx/app/python2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1143, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Command "/home/work/gcc/opt/gcc48/bin/gfortran -Wall -g -Wall -g -shared build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/lapack_lite/python_xerbla.o -L/usr/lib -L/home/work/gcc/opt/gcc48/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../lib64 -L/home/work/gcc/opt/gcc48/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../lib64 -Lbuild/temp.linux-x86_64-2.7 -llapack -llapack -lblas -lblas -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so" failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-j9VASQ/matplotlib/
非常感谢