【问题标题】:pip install scipy on virtualenv error RHEL6.5pip install scipy on virtualenv 错误 RHEL6.5
【发布时间】:2014-08-23 16:51:41
【问题描述】:

我已经在其他非堆栈溢出源中查阅过这些: Install line 'pip install scipy' fails

Installing SciPy with pip

install scipy using pip in virtualenv on ubuntu 12.04

Installing SciPy on Red Hat

RHEL6.5 发行版自带python2.6 我已经安装了virtualenv 和python2.7。使用pip install {package name} 安装包(在我的virtualenv 中,即在使用source MyEnvs/myEnv1/bin/activate 激活它之后)并可以使用yolk -l 验证我的环境具有我想要的包。直到我尝试pip install scipy 才找到所有内容,我收到以下错误:

[~]# pip install scipy 下载/解压 scipy 下载 scipy-0.14.0.tar.gz (10.2MB):下载了 10.2MB 为包 scipy 运行 setup.py (path:/root/PythonVirtualEnvs/env1/build/scipy/setup.py) egg_info

warning: no previously-included files matching '*_subr_*.f' found under directory 'scipy/linalg/src/id_dist/src'
no previously-included directories found matching 'scipy/special/tests/data/boost'
no previously-included directories found matching 'scipy/special/tests/data/gsl'
no previously-included directories found matching 'doc/build'
no previously-included directories found matching 'doc/source/generated'
no previously-included directories found matching '*/__pycache__'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.bak' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution

安装收集的包:scipy 为 scipy 运行 setup.py install blas_opt_info: blas_mkl_info: 在 ['/root/PythonVirtualEnvs/env1/lib'、'/usr/local/lib64'、'/usr/local/lib'、'/usr/lib64'、'/usr/ 中找不到库 mkl、vml、指南库'] 不可用

openblas_info:
  libraries  not found in ['/root/PythonVirtualEnvs/env1/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 ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']
  NOT AVAILABLE

/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/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:
  libraries blas not found in ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
  NOT AVAILABLE

/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1530: 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

/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1533: 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__)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 237, in <module>
    setup_package()
  File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 234, in setup_package
    setup(**metadata)
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/core.py", line 135, in setup
    config = configuration()
  File "/root/PythonVirtualEnvs/env1/build/scipy/setup.py", line 173, in configuration
    config.add_subpackage('scipy')
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 966, in add_subpackage
    caller_level = 2)
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 935, in get_subpackage
    caller_level = caller_level + 1)
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/setup.py", line 12, in configuration
    config.add_subpackage('integrate')
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 966, in add_subpackage
    caller_level = 2)
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 935, in get_subpackage
    caller_level = caller_level + 1)
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 872, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/integrate/setup.py", line 12, in configuration
    blas_opt = get_info('blas_opt',notfound_action=2)
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 350, in get_info
    return cl().get_info(notfound_action)
  File "/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py", line 509, in get_info
    raise self.notfounderror(self.notfounderror.__doc__)
numpy.distutils.system_info.BlasNotFoundError:
    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.
Complete output from command /root/PythonVirtualEnvs/env1/bin/python2.7 -c "import setuptools, tokenize;__file__='/root/PythonVirtualEnvs/env1/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-mun5c1-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/PythonVirtualEnvs/env1/include/site/python2.7:
blas_opt_info:

blas_mkl_info:

库 mkl,vml,guide 在 ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', ' /usr/lib']

不可用

openblas_info:

在 ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib' 中找不到库]

不可用

atlas_blas_threads_info:

设置 PTATLAS=ATLAS

在 ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas' 中找不到库 ptf77blas,ptcblas,atlas , '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']

不可用

atlas_blas_info:

在 ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas' 中找不到库 f77blas,cblas,atlas , '/usr/lib64/sse2', '/usr/lib64', '/usr/lib']

不可用

/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1521:用户警告:

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:

在 ['/root/PythonVirtualEnvs/env1/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib ']

不可用

/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1530:用户警告:

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:

不可用

/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py:1533:用户警告:

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)

Traceback(最近一次调用最后一次):

文件“”,第 1 行,在

文件“/root/PythonVirtualEnvs/env1/build/scipy/setup.py”,第 237 行,在

setup_package()

文件“/root/PythonVirtualEnvs/env1/build/scipy/setup.py”,第 234 行,在 setup_package 中

setup(**metadata)

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/core.py”,第 135 行,在设置中

config = configuration()

文件“/root/PythonVirtualEnvs/env1/build/scipy/setup.py”,第 173 行,在配置中

config.add_subpackage('scipy')

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py”,第 966 行,在 add_subpackage 中

caller_level = 2)

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py”,第 935 行,在 get_subpackage 中

caller_level = caller_level + 1)

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py”,第 872 行,在 _get_configuration_from_setup_py 中

config = setup_module.configuration(*args)

文件“scipy/setup.py”,第 12 行,在配置中

config.add_subpackage('integrate')

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py”,第 966 行,在 add_subpackage 中

caller_level = 2)

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py”,第 935 行,在 get_subpackage 中

caller_level = caller_level + 1)

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/misc_util.py”,第 872 行,在 _get_configuration_from_setup_py 中

config = setup_module.configuration(*args)

文件“scipy/integrate/setup.py”,第 12 行,在配置中

blas_opt = get_info('blas_opt',notfound_action=2)

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py”,第 350 行,在 get_info 中

return cl().get_info(notfound_action)

文件“/root/PythonVirtualEnvs/env1/lib/python2.7/site-packages/numpy/distutils/system_info.py”,第 509 行,在 get_info 中

raise self.notfounderror(self.notfounderror.__doc__)

numpy.distutils.system_info.BlasNotFoundError:

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.

正在清理... 命令 /root/PythonVirtualEnvs/env1/bin/python2.7 -c "import setuptools, tokenize;file='/root/PythonVirtualEnvs/env1/build/scipy/setup.py';exec(compile (getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" 安装 --record /tmp/pip-mun5c1-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/PythonVirtualEnvs/env1/include/ site/python2.7 在 /root/PythonVirtualEnvs/env1/build/scipy 中出现错误代码 1 失败 在 /root/.pip/pip.log 中存储失败的调试日志

我验证scipy、atlas、blas已经通过yum安装了。我不知道从哪里开始,我想找到一个使用pip的解决方案,即我不想做easy_install scipy如果您有任何建议请告诉我。

【问题讨论】:

    标签: scipy pip virtualenv


    【解决方案1】:

    我通过安装以下软件包解决了这个问题:

    1. sudo apt-get install python-pip python-dev build-essential
    2. sudo apt-get install libatlas-base-dev gfortran

    然后通过

    安装 numpy 或 scipy 和任何其他工具
    pip install <package--name> inside your virtualenv 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-13
      • 2017-09-12
      • 1970-01-01
      • 2013-04-01
      • 1970-01-01
      • 2017-03-13
      • 2018-05-25
      相关资源
      最近更新 更多