我通过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
知道可能导致这种情况的原因吗?
答案 0 :(得分:3)
显然没有安装openBLAS。 您可以从http://www.openblas.net/获取它,然后从源代码编译它。
更简单的安装scipy的方法当然只是
apt-get install python-scipy
答案 1 :(得分:1)
看看here,需要一些外部包。
完整安装指南为over there,但上一个链接中经过验证的答案提供了很好的见解。