[英]installing scipy package for Windows 10
How can I install scipy package for Python2.7 in Windows 10? 如何在Windows 10中为Python2.7安装scipy软件包? I get this error:
我收到此错误:
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\
I can install other packages like networkx using pip install networkx though. 我可以使用pip install networkx安装其他包,例如networkx。
There are two ways: 有两种方法:
Scipy website states: Scipy网站指出:
Windows does not have any package manager analogous to that in Linux, so installing one of the scientific Python distributions mentioned above is preferred.
Windows没有类似于Linux的软件包管理器,因此,最好安装上述科学的Python发行版之一。 However, if that is not an option, Christoph Gohlke provides pre-built Windows installers for many Python packages, including all of the core SciPy stack, which work extremely well.
但是,如果不是这样,Christoph Gohlke将为许多Python软件包(包括所有核心SciPy堆栈)提供预建的Windows安装程序,这些程序非常有效。
C:\\Python27\\Scripts\\pip.exe install <wheel name>
. C:\\Python27\\Scripts\\pip.exe install <wheel name>
。 Note: make sure the .whl is in the same directory as pip. See the easiest solution is to unzip the .whl file using 7-zip.
查看最简单的解决方案是使用7-zip解压缩.whl文件。 Then in the unzipped directory you will find the module which you can copy and paste in the directory C:/Python34/Lib/site-packages/ (or wherever else you have installed Python).
然后,在解压缩的目录中,您将找到可以复制并粘贴到目录C:/ Python34 / Lib / site-packages /(或安装Python的其他位置)中的模块。
The second point is from this SO answer 第二点是从这样的答案
[EDIT] [编辑]
Friendly note: use win-bash
(from the anniversary update), it's really good. 友情提示:使用
win-bash
(周年纪念更新),这真的很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.