python - ubuntu 14.04 中的 scipy 安装失败

标签 python scipy ubuntu-14.04 virtualenv vmware

我正在通过 VMWare Workstation 11 和虚拟环境运行 Ubuntu 14.04,我尝试通过以下方式安装 scipy:

sudo pip install scipy 

并将其作为控制台输出:

  Downloading scipy-0.17.0.tar.gz (12.4MB)
    100% |████████████████████████████████| 12.4MB 115kB/s 
Installing collected packages: scipy
  Running setup.py install for scipy ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-C9op9y/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4yRNRk-record/install-record.txt --single-version-externally-managed --compile:
    lapack_opt_info:
    openblas_lapack_info:
      libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
      NOT AVAILABLE

lapack_mkl_info:
mkl_info:
  libraries mkl,vml,guide not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
  libraries tatlas,tatlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries tatlas,tatlas not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
  NOT AVAILABLE

atlas_3_10_info:
  libraries satlas,satlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries satlas,satlas not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_info'>
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  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/lib
  libraries lapack_atlas not found in /usr/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_threads_info'>
  NOT AVAILABLE

atlas_info:
  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/lib
  libraries lapack_atlas not found in /usr/lib
  libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_info'>
  NOT AVAILABLE

/usr/local/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1542: 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/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
  NOT AVAILABLE

/usr/local/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1553: 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

/usr/local/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1556: 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 from scipy source directory.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-C9op9y/scipy/setup.py", line 265, in <module>
    setup_package()
  File "/tmp/pip-build-C9op9y/scipy/setup.py", line 262, in setup_package
    setup(**metadata)
  File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/core.py", line 135, in setup
    config = configuration()
  File "/tmp/pip-build-C9op9y/scipy/setup.py", line 182, in configuration
    config.add_subpackage('scipy')
  File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 1003, in add_subpackage
    caller_level = 2)
  File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 972, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 909, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/setup.py", line 15, in configuration
    config.add_subpackage('linalg')
  File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 1003, in add_subpackage
    caller_level = 2)
  File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 972, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/misc_util.py", line 909, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/linalg/setup.py", line 20, in configuration
    raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-C9op9y/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-4yRNRk-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-C9op9y/scipy/
/usr/local/lib/python2.7/dist-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

知道是什么原因造成的吗?

最佳答案

显然没有安装 openBLAS。 你可以从http://www.openblas.net/得到它然后从源代码编译它。

安装 scipy 的更简单的方法当然是

apt-get install python-scipy

关于python - ubuntu 14.04 中的 scipy 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36341001/

相关文章:

ubuntu - Sublime Text 3 : XDebug does not stop in breakpoints anymore

Python 打印重定向作为 stdin 命令行参数

python - WHERE 子句中的 MySQL 和 SQLAlchemy 整数转移

具有字符串索引的 Python 2 维数组(矩阵)

python - 2D 插值导致 OverflowError : Too many data points to interpolate

python-2.7 - Voronoi细胞的体积( python 皮)

python - STFT 生成的重叠帧数

python - if __name__ == "__main__": 的位置

video-streaming - gst-launch-1.0 无元素 "hlssink"错误

docker - 端口转发 Ubuntu - Docker