出错信息如下:
~/pandas$ sudo pip install pandas
You are using pip version 7.1.0, however version 8.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pandas
Using cached pandas-0.17.1.tar.gz
Complete output from command python setup.py egg_info:
Running from numpy source directory.
/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/setup.py:327: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command, proceeding with "
/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/system_info.py:1640: UserWarning:
Atlas () 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__)
/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/system_info.py:1649: UserWarning:
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__)
/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/system_info.py:1652: UserWarning:
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__)
/bin/sh: svnversion: 未找到命令
/bin/sh: svnversion: 未找到命令
/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/system_info.py:1542: UserWarning:
Atlas () 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__)
/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/system_info.py:1553: UserWarning:
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__)
/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/system_info.py:1556: UserWarning:
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__)
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable lf95
Could not locate executable pgfortran
Could not locate executable f90
Could not locate executable f77
Could not locate executable fort
Could not locate executable efort
Could not locate executable efc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pathf95
don't know how to compile Fortran code on platform 'posix'
gcc: 错误:/usr/lib/rpm/redhat/redhat-hardened-cc1:没有那个文件或目录
gcc: 错误:/usr/lib/rpm/redhat/redhat-hardened-cc1:没有那个文件或目录
Traceback (most recent call last):
File "", line 20, in
File "/tmp/pip-build-4kdCmD/pandas/setup.py", line 589, in
**setuptools_kwargs)
File "/usr/lib64/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 836, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1081, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1093, in obtain
return installer(requirement)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 629, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 659, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 842, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1070, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1056, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 240, in run_setup
raise
File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 164, in save_modules
saved_exc.resume()
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 139, in resume
compat.reraise(type, exc, self._tb)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 152, in save_modules
yield saved
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 237, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 267, in run
return func()
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 236, in runner
_execfile(setup_script, ns)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/setup.py", line 386, in
lib_depends = [srcpath(f, suffix='.pyx') for f in lib_depends]
File "/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/setup.py", line 378, in setup_package
File "/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 151, in run
self.run_command("egg_info")
File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/command/egg_info.py", line 18, in run
File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/command/build_src.py", line 147, in run
File "/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/command/build_src.py", line 158, in build_sources
File "/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/command/build_src.py", line 293, in build_library_sources
File "/tmp/easy_install-6QtmIi/numpy-1.11.0rc1/numpy/distutils/command/build_src.py", line 376, in generate_sources
File "numpy/core/setup.py", line 654, in get_mathlib_info
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-4kdCmD/pandas
解决办法:
sudo dnf install gcc-c++ gcc-gfortran redhat-rpm-config
本人通过以上办法解决,如有其它情况,欢迎补充。