错误:使用pip在Windows 10 64位中安装SciPy(Python 3.5.2)

Error: Installing SciPy in Windows 10 64bit using pip (Python 3.5.2)

我想通过pip(命令行)在我的系统中安装SciPy包。 它是Windows 10 64位系统。 我已经安装了Python 3.5.2。 我已经安装了其他机器学习和统计软件包,如numpy,sklearn,pandas,matplotlib,sympy,jupyter,ipython和nose。 它们都已成功安装,没有任何错误。

我正在使用此命令从pip安装scipy:

C:\Projects\Kaggle>pip install scipy

但是在安装scipy时,我收到此错误:

C:\Projects\Kaggle>pip 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:\users\i319268\appdata\local\programs\python\python35\python.exe -u
-c"import setuptools, tokenize;file='C:\Users\i319268\AppData\Local\Temp\pip-build-b1nkbg30\scipy\setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('

',
'
');f.close();exec(compile(code, file, 'exec'))" install
--record C:\Users\i319268\AppData\Local\Temp\pip-06bz__e6-record\install-record.txt
--single-version-externally-managed --compile:

1
2
3
4
5
6
7
8
9
10
11
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:
openblas_lapack_info:
  libraries openblas not found in ['c:\\users\\i319268\\appdata\\local\\programs\\python\\python35\\lib',

'C:\',
'c:\users\i319268\appdata\local\programs\python\python35\libs']
NOT AVAILABLE

1
2
lapack_mkl_info:
  libraries mkl_rt not found in ['c:\\users\\i319268\\appdata\\local\\programs\\python\\python35\\lib',

'C:\',
'c:\users\i319268\appdata\local\programs\python\python35\libs']
NOT AVAILABLE

1
2
3
4
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\system_info.py:639:

UserWarning: Specified path
C:\projects
umpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.11.38-sse2-64\lib
is invalid.
warnings.warn('Specified path %s is invalid.' % d)

NOT AVAILABLE

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\system_info.py:1532:

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\i319268\appdata\local\programs\python\python35\lib',
'C:\',
'c:\users\i319268\appdata\local\programs\python\python35\libs']
NOT AVAILABLE

1
2
c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\system_info.py:1543:

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

1
2
c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\system_info.py:1546:

UserWarning:
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

1
2
3
4
Running from scipy source directory.
Traceback (most recent call last):
  File"<string>", line 1, in <module>
  File"C:\Users\i319268\AppData\Local\Temp\pip-build-b1nkbg30\scipy\setup.py",

line 415, in
setup_package()
File"C:\Users\i319268\AppData\Local\Temp\pip-build-b1nkbg30\scipy\setup.py",
line 411, in setup_package
setup(**metadata)
File"c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\core.py",
line 135, in setup
config = configuration()
File"C:\Users\i319268\AppData\Local\Temp\pip-build-b1nkbg30\scipy\setup.py",
line 335, in configuration
config.add_subpackage('scipy')
File"c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\misc_util.py",
line 1000, in add_subpackage
caller_level = 2)
File"c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\misc_util.py",
line 969, in get_subpackage
caller_level = caller_level + 1)
File"c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\misc_util.py",
line 906, 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\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\misc_util.py",
line 1000, in add_subpackage
caller_level = 2)
File"c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\misc_util.py",
line 969, in get_subpackage
caller_level = caller_level + 1)
File"c:\users\i319268\appdata\local\programs\python\python35\lib\site-packages
umpy\distutils\misc_util.py",
line 906, 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

1
---------------------------------------- Command"c:\users\i319268\appdata\local\programs\python\python35\python.exe -u

-c"import setuptools, tokenize;file='C:\Users\i319268\AppData\Local\Temp\pip-build-b1nkbg30\scipy\setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('

',
'
');f.close();exec(compile(code, file, 'exec'))" install
--record C:\Users\i319268\AppData\Local\Temp\pip-06bz__e6-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in C:\Users\i319268\AppData\Local\Temp\pip-build-b1nkbg30\scipy\

我也尝试过Christoph Gohlke的非官方SciPy轮组。 当我尝试从他的wheel包安装时,它会出现如下错误:

C:\Projects\Kaggle>pip install scipy-0.18.1-cp36-cp36m-win32.whl

scipy-0.18.1-cp36-cp36m-win32.whl is not a supported wheel on this
platform.

我已经看过StackOverflow的答案,但我完全陷入困境,无法弄清楚任何事情。 任何帮助将不胜感激。 提前致谢。


这已经解决了。 感谢@ BrenBarn在评论中的帮助,我现在已经开始运行了。

让一切工作的最佳方式是使用Christoph Gohlke的轮组。

但是,这里要注意的主要事项是,您应该只使用非官方软件包中的所有软件包,因为许多软件包可能依赖于其他软件包。 需要记住的另一件事是选择适当版本的轮组(32位或64位以及正确版本的python [主要在轮组名称中提到为cp])。

例如,

1
2
3
SciPy wheel package for 64bit system and Python 3.6: scipy?0.18.1?cp36?cp36m?win_amd64.whl

SciPy wheel package for 32bit system and Python 2.7: scipy?0.18.1?cp27?cp27m?win32.whl

希望这对其他人也有帮助。 再次感谢@BrenBarn的帮助。