我正在使用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文件夹中看到一个文件夹,正如我所料,我得到一个ImportError:当我在终端上输入scipy时,没有名为scipy的模块错误。
答案 0 :(得分:5)
您似乎没有安装编译器来编译scipy及其依赖项。这是Windows上的常见问题。您需要安装一个编译器(长路径)或下载Windows的预编译二进制文件(对于需要在Windows上使用的软件包,通常更加用户友好)。
抓取sourceforge的最新版本Individual binary and source packages (from scipy.org/install.html)
SciPy堆栈中许多软件包的维护者为常见的Windows和OS-X系统提供“官方”二进制安装程序,可用于逐个安装软件包。这些安装程序通常构建为与python.org提供的Python二进制文件兼容。
答案 1 :(得分:1)
很长时间我在设置SciPy
后尝试建立numpy
。
我也用https://sourceforge.net/projects/scipy/files/scipy/
但我win64
,但仅限于win32
网站。下载并安装scipy-0.16.1-win32-superpack-python2.7.exe
,现在scipy
出现在已安装的模块中。