gpt4 book ai didi

python - 在 Windows 上安装 scipy 时出错

转载 作者:太空狗 更新时间:2023-10-30 01:01:47 25 4
gpt4 key购买 nike

我正在使用 windows 机器和 2.7 版本的 python。我已经安装了 numpy,现在我正在尝试安装 scipy。我已经尝试使用 easy install 命令并通过下载 zip 文件然后运行 ​​setup.py 文件来安装它。

当我尝试通过 easy_install 安装它时

c:\Python27\Scripts>easy_install scipy
Searching for scipy
Reading https://pypi.python.org/simple/scipy/
Best match: scipy 0.13.3
Downloading https://pypi.python.org/packages/source/s/scipy/scipy-0.13.3.zip#md5
=20ff3a867cc5925ef1d654aed2ff7e88
Processing scipy-0.13.3.zip
Writing c:\users\yash\appdata\local\temp\easy_install-k37as1\scipy-0.13.3\setup.
cfg
Running scipy-0.13.3\setup.py -q bdist_egg --dist-dir c:\users\yash\appdata\loca
l\temp\easy_install-k37as1\scipy-0.13.3\egg-dist-tmp-yi3r5o
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:576: UserWarning: S
pecified path C:/Program Files (x86)/Intel/Composer XE/mkl/lib/ia32 is invalid.
warnings.warn('Specified path %s is invalid.' % d)
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:576: UserWarning: S
pecified path C:/Program Files (x86)/Intel/Composer XE/compiler/lib/ia32 is inva
lid.
warnings.warn('Specified path %s is invalid.' % d)
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:576: UserWarning: S
pecified path C:/Program Files (x86)/Intel/Composer XE/mkl/include is invalid.
warnings.warn('Specified path %s is invalid.' % d)
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:1522: 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__)
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:1531: 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__)
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:1534: 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__)
error:
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.

c:\Python27\Scripts>

这就是我运行 setup.py 文件时发生的情况

C:\Users\Yash\Downloads\scipy-0.13.2\scipy-0.13.2>python setup.py install
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'test_suite'
warnings.warn(msg)
blas_opt_info:
blas_mkl_info:
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:576: UserWarning: S
pecified path C:/Program Files (x86)/Intel/Composer XE/mkl/lib/ia32 is invalid.
warnings.warn('Specified path %s is invalid.' % d)
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:576: UserWarning: S
pecified path C:/Program Files (x86)/Intel/Composer XE/compiler/lib/ia32 is inva
lid.
warnings.warn('Specified path %s is invalid.' % d)
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:576: UserWarning: S
pecified path C:/Program Files (x86)/Intel/Composer XE/mkl/include is invalid.
warnings.warn('Specified path %s is invalid.' % d)
libraries mkl_lapack95,mkl_blas95,mkl_intel_c,mkl_intel_thread,mkl_core,libiom
p5md,libifportmd not found in []
NOT AVAILABLE

openblas_info:
libraries openblas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\l
ibs']
NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', '
C:\\Python27\\libs']
NOT AVAILABLE

atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\
Python27\\libs']
NOT AVAILABLE

C:\Python27\lib\site-packages\numpy\distutils\system_info.py:1522: 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 ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs'
]
NOT AVAILABLE

C:\Python27\lib\site-packages\numpy\distutils\system_info.py:1531: 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

C:\Python27\lib\site-packages\numpy\distutils\system_info.py:1534: 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 230, in <module>
setup_package()
File "setup.py", line 227, in setup_package
setup(**metadata)
File "C:\Python27\lib\site-packages\numpy\distutils\core.py", line 135, in set
up
config = configuration()
File "setup.py", line 170, in configuration
config.add_subpackage('scipy')
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 966, i
n add_subpackage
caller_level = 2)
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 935, i
n get_subpackage
caller_level = caller_level + 1)
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 872, i
n _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\setup.py", line 12, in configuration
config.add_subpackage('integrate')
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 966, i
n add_subpackage
caller_level = 2)
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 935, i
n get_subpackage
caller_level = caller_level + 1)
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 872, i
n _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 "C:\Python27\lib\site-packages\numpy\distutils\system_info.py", line 350,
in get_info
return cl().get_info(notfound_action)
File "C:\Python27\lib\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.

C:\Users\Yash\Downloads\scipy-0.13.2\scipy-0.13.2>

我是 python 的新手,我不明白为什么会收到这些错误。我在 Python27 的 Lib 文件夹中没有看到文件夹,正如预期的那样,当我在终端上输入 import scipy 时,我收到了 ImportError: No module named scipy 错误。

最佳答案

您似乎没有安装编译器来编译 scipy 及其依赖项。这是 Windows 上的常见问题。您需要安装一个编译器(漫长的路线)或下载适用于 Windows 的预编译二进制文件(对于您需要在 Windows 上使用的软件包,通常更加用户友好)。

Individual binary and source packages (from scipy.org/install.html)

The maintainers of many of the packages in the SciPy stack provide “official” binary installers for common Windows and OS-X systems that can be used to install the packages one by one. These installers are generally built to be compatible with the Python binaries available from python.org.

我会尝试从 http://sourceforge.net/projects/scipy/files/scipy/ 的 sourceforge 获取最新版本

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com