python - 在 Windows 上安装 scipy 包时出错

标签 python windows scipy pip installation

我尝试使用 pip 在 Windows 上安装 python2.7 的一些特定软件包,并在尝试安装 scipy 0.16.1 时出现以下错误:

(env) C:\Users\Asus\Documents\LEI\Algo-Rhythm>pip install --no-use-wheel scipy==0.16.1
DEPRECATION: --no-use-wheel is deprecated and will be removed in the future. Please use --no-binary :all: instead.
Collecting scipy==0.16.1
  Using cached scipy-0.16.1.tar.gz
Skipping bdist_wheel for scipy, due to binaries being disabled for it.
Installing collected packages: scipy
  Running setup.py install for scipy ... error
Complete output from command c:\users\asus\documents\lei\algo-rhythm\env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\asus\\appdata\\local\\temp\\pip-build-itlx8i\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\asus\appdata\local\temp\pip-uzs8w6-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\asus\documents\lei\algo-rhythm\env\include\site\python2.7\scipy:
lapack_opt_info:
openblas_lapack_info:
  libraries openblas not found in ['c:\\users\\asus\\documents\\lei\\algo-rhythm\\env\\lib', 'C:\\']
  NOT AVAILABLE

lapack_mkl_info:
mkl_info:
  libraries mkl,vml,guide not found in ['c:\\users\\asus\\documents\\lei\\algo-rhythm\\env\\lib', 'C:\\']
  NOT AVAILABLE

  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\system_info.py:635: UserWarning: Specified path C:\projects\np-wheel-builder\atlas-builds\atlas-3.11.38-sse2-64\lib is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
  NOT AVAILABLE

atlas_3_10_info:
<class 'numpy.distutils.system_info.atlas_3_10_info'>
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
<class 'numpy.distutils.system_info.atlas_threads_info'>
  NOT AVAILABLE

atlas_info:
<class 'numpy.distutils.system_info.atlas_info'>
  NOT AVAILABLE

c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\system_info.py:1552: 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 ['c:\\users\\asus\\documents\\lei\\algo-rhythm\\env\\lib', 'C:\\']
  NOT AVAILABLE

c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\system_info.py:1563: 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

c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\system_info.py:1566: 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 "c:\users\asus\appdata\local\temp\pip-build-itlx8i\scipy\setup.py", line 253, in <module>
    setup_package()
  File "c:\users\asus\appdata\local\temp\pip-build-itlx8i\scipy\setup.py", line 250, in setup_package
    setup(**metadata)
  File "c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\core.py", line 135, in setup
    config = configuration()
  File "c:\users\asus\appdata\local\temp\pip-build-itlx8i\scipy\setup.py", line 175, in configuration
    config.add_subpackage('scipy')
  File "c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\misc_util.py", line 1002, in add_subpackage
    caller_level = 2)
  File "c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\misc_util.py", line 971, in get_subpackage
    caller_level = caller_level + 1)
  File "c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\misc_util.py", line 908, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy\setup.py", line 15, in configuration
    config.add_subpackage('linalg')
  File "c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\misc_util.py", line 1002, in add_subpackage
    caller_level = 2)
  File "c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\misc_util.py", line 971, in get_subpackage
    caller_level = caller_level + 1)
  File "c:\users\asus\documents\lei\algo-rhythm\env\lib\site-packages\numpy\distutils\misc_util.py", line 908, 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 "c:\users\asus\documents\lei\algo-rhythm\env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\asus\\appdata\\local\\temp\\pip-build-itlx8i\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\asus\appdata\local\temp\pip-uzs8w6-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\asus\documents\lei\algo-rhythm\env\include\site\python2.7\scipy" failed with error code 1 in c:\users\asus\appdata\local\temp\pip-build-itlx8i\scipy\  

我认为我丢失了一些软件包,但我很难理解这个错误。我使用了不使用轮子选项,因为它无法构建轮子。提前致谢。

最佳答案

在 Windows 上,您必须从源代码构建 Scipy。

在 Windows 上获取 Scipy 的最简单方法是使用 anaconda 包管理器。它将自动安装 Scipy 及其所有依赖项。

https://www.anaconda.com/download/

关于python - 在 Windows 上安装 scipy 包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49634506/

相关文章:

node.js - 如何在NodeJS中将值附加到PATH环境变量?

python - 寻找数据边界处的峰值

python - 如何设置目标参数来使用 scipy.optimize 解决多目标问题?

python - 对数轴上使用 fftpack 的真实数据的功率谱

python - 在 Heroku 上安装 PyICU

python - 比较两个系列时,如何根据一个系列进行过滤?

python - 如何从 Twisted 的 deferToThread API 向 Deferred 添加超时?

c - 为什么许多窗口的窗口创建速度很慢?可以更快吗?

windows - .bat 文件为当前用户重命名目标文件夹

python - OCR背景图像清理