我正在安装SciPy的绝对噩梦。我有它在anaconda上工作,但是解释器没有我的其他库。
使用此命令python -m pip install scipy
产生错误:
Collecting scipy
Using cached scipy-0.19.0.zip
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\\loba3\\appdata\\local\\temp\\pip-build-9_n1ir\\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\loba3\appdata\local\temp\pip-vxgx6l-record\install-record.txt --single-version-externally-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:
openblas_lapack_info:
libraries openblas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
lapack_mkl_info:
libraries mkl_rt not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:639: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.10.1-sse2-32\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:\Python27\lib\site-packages\numpy\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:\\Python27\\lib', 'C:\\', 'C:\\Python27\\libs']
NOT AVAILABLE
C:\Python27\lib\site-packages\numpy\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
C:\Python27\lib\site-packages\numpy\distutils\system_info.py:1546: 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.
non-existing path in 'scipy\\integrate': 'quadpack.h'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\loba3\appdata\local\temp\pip-build-9_n1ir\scipy\setup.py", line 416, in <module>
setup_package()
File "c:\users\loba3\appdata\local\temp\pip-build-9_n1ir\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "C:\Python27\lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
File "c:\users\loba3\appdata\local\temp\pip-build-9_n1ir\scipy\setup.py", line 336, in configuration
config.add_subpackage('scipy')
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 1000, in add_subpackage
caller_level = 2)
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 969, in get_subpackage
caller_level = caller_level + 1)
File "C:\Python27\lib\site-packages\numpy\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:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 1000, in add_subpackage
caller_level = 2)
File "C:\Python27\lib\site-packages\numpy\distutils\misc_util.py", line 969, in get_subpackage
caller_level = caller_level + 1)
File "C:\Python27\lib\site-packages\numpy\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
----------------------------------------
Command "C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\loba3\\appdata\\local\\temp\\pip-build-9_n1ir\\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\loba3\appdata\local\temp\pip-vxgx6l-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\loba3\appdata\local\temp\pip-build-9_n1ir\scipy\
类似安装: pip3安装scipy 生产:
C:\Users\loba3>pip3 install scipy
Collecting scipy
Using cached scipy-0.19.0.zip
Building wheels for collected packages: scipy
Running setup.py bdist_wheel for scipy ... error
Complete output from command c:\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\loba3\\AppData\\Local\\Temp\\pip-build-0xe2tade\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\loba3\AppData\Local\Temp\tmppxe32c39pip-wheel- --python-tag cp36:
lapack_opt_info:
lapack_mkl_info:
libraries mkl_rt not found in ['c:\\python36-32\\lib', 'C:\\', 'c:\\python36-32\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['c:\\python36-32\\lib', 'C:\\', 'c:\\python36-32\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
c:\python36-32\lib\site-packages\numpy\distutils\system_info.py:1051: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.10.1-sse2-32\lib is invalid.
pre_dirs = system_info.get_paths(self, section, key)
<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:\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: 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.
self.calc_info()
lapack_info:
libraries lapack not found in ['c:\\python36-32\\lib', 'C:\\', 'c:\\python36-32\\libs']
NOT AVAILABLE
c:\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: 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.
self.calc_info()
lapack_src_info:
NOT AVAILABLE
c:\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: 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.
self.calc_info()
NOT AVAILABLE
Running from scipy source directory.
non-existing path in 'scipy\\integrate': 'quadpack.h'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\loba3\AppData\Local\Temp\pip-build-0xe2tade\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\loba3\AppData\Local\Temp\pip-build-0xe2tade\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "c:\python36-32\lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
File "C:\Users\loba3\AppData\Local\Temp\pip-build-0xe2tade\scipy\setup.py", line 336, in configuration
config.add_subpackage('scipy')
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1001, in add_subpackage
caller_level = 2)
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 970, in get_subpackage
caller_level = caller_level + 1)
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 907, 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:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1001, in add_subpackage
caller_level = 2)
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 970, in get_subpackage
caller_level = caller_level + 1)
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 907, 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
----------------------------------------
Failed building wheel for scipy
Running setup.py clean for scipy
Complete output from command c:\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\loba3\\AppData\\Local\\Temp\\pip-build-0xe2tade\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
`setup.py clean` is not supported, use one of the following instead:
- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
Add `--force` to your command to use it anyway if you must (unsupported).
----------------------------------------
Failed cleaning build dir for scipy
Failed to build scipy
Installing collected packages: scipy
Running setup.py install for scipy ... error
Complete output from command c:\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\loba3\\AppData\\Local\\Temp\\pip-build-0xe2tade\\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\loba3\AppData\Local\Temp\pip-xbbmy91e-record\install-record.txt --single-version-externally-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:
libraries mkl_rt not found in ['c:\\python36-32\\lib', 'C:\\', 'c:\\python36-32\\libs']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['c:\\python36-32\\lib', 'C:\\', 'c:\\python36-32\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
c:\python36-32\lib\site-packages\numpy\distutils\system_info.py:1051: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.10.1-sse2-32\lib is invalid.
pre_dirs = system_info.get_paths(self, section, key)
<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:\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: 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.
self.calc_info()
lapack_info:
libraries lapack not found in ['c:\\python36-32\\lib', 'C:\\', 'c:\\python36-32\\libs']
NOT AVAILABLE
c:\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: 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.
self.calc_info()
lapack_src_info:
NOT AVAILABLE
c:\python36-32\lib\site-packages\numpy\distutils\system_info.py:572: 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.
self.calc_info()
NOT AVAILABLE
Running from scipy source directory.
non-existing path in 'scipy\\integrate': 'quadpack.h'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\loba3\AppData\Local\Temp\pip-build-0xe2tade\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\loba3\AppData\Local\Temp\pip-build-0xe2tade\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "c:\python36-32\lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
File "C:\Users\loba3\AppData\Local\Temp\pip-build-0xe2tade\scipy\setup.py", line 336, in configuration
config.add_subpackage('scipy')
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1001, in add_subpackage
caller_level = 2)
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 970, in get_subpackage
caller_level = caller_level + 1)
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 907, 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:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 1001, in add_subpackage
caller_level = 2)
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 970, in get_subpackage
caller_level = caller_level + 1)
File "c:\python36-32\lib\site-packages\numpy\distutils\misc_util.py", line 907, 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:\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\loba3\\AppData\\Local\\Temp\\pip-build-0xe2tade\\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\loba3\AppData\Local\Temp\pip-xbbmy91e-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\loba3\AppData\Local\Temp\pip-build-0xe2tade\scipy\
我也试过安装numpy + mlk
C:\Python27\toinstall>python -m pip install numpy-1.11.3+mkl-cp27-cp27m-win_amd64.whl
numpy-1.11.3+mkl-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
但它不会让我安装
From this post我安装了minGW并将其添加到我的路径中。安装SciPy仍然会抛出错误。
请帮帮我
编辑: 我正在运行64位系统。 python 2.7然而,当我尝试在python 3.6中安装时,显示相同的错误
编辑:
WTF我尝试了32位版本scipy‑0.19.0‑cp27‑cp27m‑win32.whl
并且它有效.....但是当我在Windows中system
时它说我有一个64位系统
答案 0 :(得分:2)
由于安装scipy
软件包需要预先安装许多其他依赖项才能安装,因为您可以阅读scipy网站上提到的here。
解决您的问题:
<强>方法一:强>
使用Christoph Gohlke网站
中预先构建的scipy库要安装.whl文件,只需点击
即可 pip install PATH_TO_whl_FILE
它完成了。
<强>方法2:强>
你可以简单地使用Anaconda,它带有许多科学库,包括scipy,matplotlib等......你可能需要的所有东西
答案 1 :(得分:1)
pip
的一个替代方法是使用conda
,因此您可以尝试:
conda install -c anaconda scipy=0.19.0
但通常您应该可以直接从pip
python -m pip install --upgrade pip
pip install scipy
您可以在此处找到更多信息: https://www.scipy.org/install.html
答案 2 :(得分:1)
这可能是因为你的点子已经老了。升级pip并尝试再次安装scipy。
pip install --upgrade pip
pip install scipy
答案 3 :(得分:0)
不要在Windows上编译Scipy,只需使用预编译的滚轮。您可以在此处找到它以及Windows的许多其他预编译软件包:http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
另外,请尽量不要使用Python 2.7,它不会变得更年轻。使用Python 3。
答案 4 :(得分:0)
只需添加到列表中即可:
在处理一个旧的python 2.7项目(需要scipy==0.17.1
)时,我遇到了同样的问题。通过conda安装scipy确实可以,但是我需要从需求文件中进行“纯” pip安装。
一个小时的搜索解决方案后,事实证明最新的scipy
版本(在我的情况下为scipy 1.1.0
)在Windows 10上使用pip毫无问题地安装了(适用于我的项目。)