安装scipy

时间:2016-04-26 20:50:09

标签: python scipy raspberry-pi

我正在尝试在我的覆盆子pi中安装scipy。我已经在/ home / pi文件夹中解压缩了库。我已经更改为scipy-0.17.0文件夹,然后输入python setup.py install,但出现以下错误。我该怎么办?我不知道为什么我不能使用sudo apt-get func。

running from scipy source directory.
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in /usr/local/lib
  libraries mkl,vml,guide not found in /usr/lib
  libraries mkl,vml,guide not found in /usr/lib/arm-linux-gnueabihf
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/atlas-base
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/arm-linux-gnueabihf
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in /usr/local/lib
  libraries f77blas,cblas,atlas not found in /usr/lib/atlas-base
  libraries f77blas,cblas,atlas not found in /usr/lib
  libraries f77blas,cblas,atlas not found in /usr/lib/arm-linux-gnueabihf
  NOT AVAILABLE

/usr/lib/pymodules/python2.7/numpy/distutils/system_info.py:1435: 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 /usr/local/lib
  libraries blas not found in /usr/lib
  libraries blas not found in /usr/lib/arm-linux-gnueabihf
  NOT AVAILABLE

/usr/lib/pymodules/python2.7/numpy/distutils/system_info.py:1444: 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

/usr/lib/pymodules/python2.7/numpy/distutils/system_info.py:1447: 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 "setup.py", line 165, in <module>
    setup_package()
  File "setup.py", line 161, in setup_package
    configuration=configuration)
  File "/usr/lib/pymodules/python2.7/numpy/distutils/core.py", line 152, in setup
    config = configuration()
  File "setup.py", line 136, in configuration
    config.add_subpackage('scipy')
  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 1002, in add_subpackage
    caller_level = 2)
  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 971, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 908, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/setup.py", line 9, in configuration
    config.add_subpackage('integrate')
  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 1002, in add_subpackage
    caller_level = 2)
  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 971, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib/pymodules/python2.7/numpy/distutils/misc_util.py", line 908, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/integrate/setup.py", line 11, in configuration
    blas_opt = get_info('blas_opt',notfound_action=2)
  File "/usr/lib/pymodules/python2.7/numpy/distutils/system_info.py", line 331, in get_info
    return cl().get_info(notfound_action)
  File "/usr/lib/pymodules/python2.7/numpy/distutils/system_info.py", line 482, 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.

2 个答案:

答案 0 :(得分:1)

这里已经提出了与linux有关的问题。树莓派也一样。您可以查看here

答案 1 :(得分:0)

缺少blas库:

blas_info:


libraries blas not found in /usr/local/lib
  libraries blas not found in /usr/lib
  libraries blas not found in /usr/lib/arm-linux-gnueabihf
  NOT AVAILABLE

您是否曾尝试通过像

这样的pip安装scypi
python -m pip install scypi

它应该能够解决所有需要的依赖并为您安装。您也可以尝试使用apt-get:

sudo apt-get install scipy

请确保包名称适用于apt-get via

apt-cache search sypi | less

希望对你有帮助。