简体   繁体   English

在Windows上安装scipy时出错

[英]Error while installing scipy on windows

I am working on a windows machine and 2.7 version of python. 我正在使用Windows机器和2.7版本的python。 I have already installed numpy and now I am trying to install scipy. 我已经安装了numpy,现在我正在尝试安装scipy。 I have tried installing it using the easy install command and by downloading a zip file and then running the setup.py file. 我尝试使用easy install命令安装它,然后下载zip文件然后运行setup.py文件。

When I try installing it by the easy_install 当我尝试通过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>

And this is what happens when I run the setup.py file 这就是我运行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>

I am new to python and I am not understanding why I am getting these errors. 我是python的新手,我不明白为什么我会收到这些错误。 I don't see a folder in the Lib folder of Python27 and as expected I am getting an ImportError: No module named scipy error when I say import scipy on the terminal. 我没有在Python27的Lib文件夹中看到一个文件夹,正如我所料,我得到一个ImportError:当我在终端上输入scipy时,没有名为scipy的模块错误。

You don't appear to have a compiler installed to compile scipy and its dependencies. 您似乎没有安装编译器来编译scipy及其依赖项。 This is a common issue on windows. 这是Windows上的常见问题。 You'll need to install a compiler (the long route) or download the pre-compiled binaries for windows (usually much more user-friendly for packages you need to use on windows). 您需要安装一个编译器(长路径)或下载Windows的预编译二进制文件(对于需要在Windows上使用的软件包,通常更加用户友好)。

Individual binary and source packages (from scipy.org/install.html) 单个二进制和源包(来自scipy.org/install.html)

The maintainers of many of the packages in the SciPy stack provide “official” binary installers for common Windows and OS-X systems that can be used to install the packages one by one. SciPy堆栈中许多软件包的维护者为常见的Windows和OS-X系统提供“官方”二进制安装程序,可用于逐个安装软件包。 These installers are generally built to be compatible with the Python binaries available from python.org. 这些安装程序通常构建为与python.org提供的Python二进制文件兼容。

I'd try grabbing the latest version from sourceforge at http://sourceforge.net/projects/scipy/files/scipy/ 我试着在http://sourceforge.net/projects/scipy/files/scipy/上从sourceforge获取最新版本

Long I tried to establish a SciPy after setting numpy . 很久我尝试在设置numpy之后建立一个SciPy I too used https://sourceforge.net/projects/scipy/files/scipy/ But I win64 , but only under the win32 website. 我也使用了https://sourceforge.net/projects/scipy/files/scipy/但我win64 ,但只在win32网站下。 Download and install scipy-0.16.1-win32-superpack-python2.7.exe and now scipy appears in the installed modules. 下载并安装scipy-0.16.1-win32-superpack-python2.7.exe ,现在scipy出现在已安装的模块中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM