如何在Windows 10中为Python2.7安装scipy软件包?我收到这个错误:
PS D:\simcut> C:\Python27\Scripts\pip.exe install scipy
Collecting scipy
Using cached scipy-0.18.1.tar.gz
Installing collected packages: scipy
Running setup.py install for scipy ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mona\\appdata\\local\\tem
p\\pip-build-6oexav\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(comp
ile(code, __file__, 'exec'))" install --record c:\users\mona\appdata\local\temp\pip-vtfkqm-record\install-record.txt --single-version-ext
ernally-managed --compile:
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['c:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in c:\python27\lib
libraries lapack_atlas not found in c:\python27\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in c:\python27\libs
libraries lapack_atlas not found in c:\python27\libs
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in c:\python27\lib
libraries lapack_atlas not found in c:\python27\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in c:\python27\libs
libraries lapack_atlas not found in c:\python27\libs
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
c:\python27\lib\site-packages\numpy\distutils\system_info.py:1408: 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:\\python27\\lib', 'C:\\', 'c:\\python27\\libs']
NOT AVAILABLE
c:\python27\lib\site-packages\numpy\distutils\system_info.py:1419: 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:\python27\lib\site-packages\numpy\distutils\system_info.py:1422: 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\mona\appdata\local\temp\pip-build-6oexav\scipy\setup.py", line 415, in <module>
setup_package()
File "c:\users\mona\appdata\local\temp\pip-build-6oexav\scipy\setup.py", line 411, in setup_package
setup(**metadata)
File "c:\python27\lib\site-packages\numpy\distutils\core.py", line 152, in setup
config = configuration()
File "c:\users\mona\appdata\local\temp\pip-build-6oexav\scipy\setup.py", line 335, in configuration
config.add_subpackage('scipy')
File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 1003, in add_subpackage
caller_level = 2)
File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 972, in get_subpackage
caller_level = caller_level + 1)
File "c:\python27\lib\site-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 "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 1003, in add_subpackage
caller_level = 2)
File "c:\python27\lib\site-packages\numpy\distutils\misc_util.py", line 972, in get_subpackage
caller_level = caller_level + 1)
File "c:\python27\lib\site-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 "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\mona\\appdata\\local\\temp\\pip-build-6oexav\\sci
py\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exe
c'))" install --record c:\users\mona\appdata\local\temp\pip-vtfkqm-record\install-record.txt --single-version-externally-managed --compil
e" failed with error code 1 in c:\users\mona\appdata\local\temp\pip-build-6oexav\scipy\
我可以使用pip install networkx安装其他软件包,例如networkx。
答案 0 :(得分:3)
有两种方法:
Scipy网站声明:
Windows没有任何类似于Linux中的软件包管理器,因此首选安装上述科学Python发行版之一。但是,如果这不是一个选项,Christoph Gohlke为许多Python软件包提供了预构建的Windows安装程序,包括所有核心SciPy堆栈,它们运行得非常好。
答案 1 :(得分:0)
我认为让Scipy在Windows上运行的最简单方法是获得WinPython。