有问题pip安装scipy

时间:2016-06-20 09:11:07

标签: python installation scipy

我尝试使用pip install scipy安装scipy,我已尝试了所有安装方法,但它给出了以下错误。 1)我已经安装了numpy 2)我尝试从pip install scipy-0.17.1-cp27-none-win_amd64.whl下载,但它说它不是这个平台上支持的轮子 3)我试过pip install svn + http://svn.scipy.org/svn/scipy/trunk/#egg=scipy 4)我尝试了pip install git + https://github.com/scipy/scipy.git

任何人都知道什么是错的?

由于

我的python版本是2.7.10 我的点子版本是8.1.2

Collecting scipy
  Using cached scipy-0.17.1.tar.gz
Building wheels for collected packages: scipy
  Running setup.py bdist_wheel for scipy ... error
  Complete output from command c:\users\user\desktop\python~1\nltk\scripts\pytho
n.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata\\loc
al\\temp\\pip-build-tvi3uj\\scipy\\setup.py';exec(compile(getattr(tokenize, 'ope
n', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_whee
l -d c:\users\user\appdata\local\temp\tmpw9kyvepip-wheel- --python-tag cp27:
  lapack_opt_info:
  openblas_lapack_info:
    libraries openblas not found in ['c:\\users\\user\\desktop\\python~1\\nltk\\
lib', 'C:\\']
    NOT AVAILABLE

  lapack_mkl_info:
  mkl_info:
    libraries mkl,vml,guide not found in ['c:\\users\\user\\desktop\\python~1\\n
ltk\\lib', 'C:\\']
    NOT AVAILABLE

    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
  c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\system_i
nfo.py:633: UserWarning: Specified path C:\projects\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:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\system_i
nfo.py:1542: 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\\user\\desktop\\python~1\\nltk\\li
b', 'C:\\']
    NOT AVAILABLE

  c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\system_i
nfo.py:1553: 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:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\system_i
nfo.py:1556: 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\user\appdata\local\temp\pip-build-tvi3uj\scipy\setup.py", lin
e 265, in <module>
      setup_package()
    File "c:\users\user\appdata\local\temp\pip-build-tvi3uj\scipy\setup.py", lin
e 262, in setup_package
      setup(**metadata)
    File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\
core.py", line 135, in setup
      config = configuration()
    File "c:\users\user\appdata\local\temp\pip-build-tvi3uj\scipy\setup.py", lin
e 182, in configuration
      config.add_subpackage('scipy')
    File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\
misc_util.py", line 1003, in add_subpackage
      caller_level = 2)
    File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\
misc_util.py", line 972, in get_subpackage
      caller_level = caller_level + 1)
    File "c:\users\user\desktop\python~1\nltk\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:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\
misc_util.py", line 1003, in add_subpackage
      caller_level = 2)
    File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\
misc_util.py", line 972, in get_subpackage
      caller_level = caller_level + 1)
    File "c:\users\user\desktop\python~1\nltk\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

  ----------------------------------------
  Failed building wheel for scipy
  Running setup.py clean for scipy
Failed to build scipy
Installing collected packages: scipy
  Running setup.py install for scipy ... error
    Complete output from command c:\users\user\desktop\python~1\nltk\scripts\pyt
hon.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata\\l
ocal\\temp\\pip-build-tvi3uj\\scipy\\setup.py';exec(compile(getattr(tokenize, 'o
pen', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install
--record c:\users\user\appdata\local\temp\pip-u5vzf_-record\install-record.txt -
-single-version-externally-managed --compile --install-headers c:\users\user\des
ktop\python~1\nltk\include\site\python2.7\scipy:
    lapack_opt_info:
    openblas_lapack_info:
      libraries openblas not found in ['c:\\users\\user\\desktop\\python~1\\nltk
\\lib', 'C:\\']
      NOT AVAILABLE

    lapack_mkl_info:
    mkl_info:
      libraries mkl,vml,guide not found in ['c:\\users\\user\\desktop\\python~1\
\nltk\\lib', 'C:\\']
      NOT AVAILABLE

      NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\system
_info.py:633: UserWarning: Specified path C:\projects\windows-wheel-builder\atla
s-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:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\system
_info.py:1542: 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\\user\\desktop\\python~1\\nltk\\
lib', 'C:\\']
      NOT AVAILABLE

    c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\system
_info.py:1553: 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:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutils\system
_info.py:1556: 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\user\appdata\local\temp\pip-build-tvi3uj\scipy\setup.py", l
ine 265, in <module>
        setup_package()
      File "c:\users\user\appdata\local\temp\pip-build-tvi3uj\scipy\setup.py", l
ine 262, in setup_package
        setup(**metadata)
      File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutil
s\core.py", line 135, in setup
        config = configuration()
      File "c:\users\user\appdata\local\temp\pip-build-tvi3uj\scipy\setup.py", l
ine 182, in configuration
        config.add_subpackage('scipy')
      File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutil
s\misc_util.py", line 1003, in add_subpackage
        caller_level = 2)
      File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutil
s\misc_util.py", line 972, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutil
s\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:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutil
s\misc_util.py", line 1003, in add_subpackage
        caller_level = 2)
      File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutil
s\misc_util.py", line 972, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\users\user\desktop\python~1\nltk\lib\site-packages\numpy\distutil
s\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:\users\user\desktop\python~1\nltk\scripts\python.exe -u -c "import se
tuptools, tokenize;__file__='c:\\users\\user\\appdata\\local\\temp\\pip-build-tv
i3uj\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).re
ad().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user\a
ppdata\local\temp\pip-u5vzf_-record\install-record.txt --single-version-external
ly-managed --compile --install-headers c:\users\user\desktop\python~1\nltk\inclu
de\site\python2.7\scipy" failed with error code 1 in c:\users\user\appdata\local
\temp\pip-build-tvi3uj\scipy\

1 个答案:

答案 0 :(得分:0)

从以下位置下载numpy + mkl车轮 http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy。 使用与您的python版本相同的版本(使用python --version或python -V检查)。例如。如果您的python是3.5.2,请下载显示cp35的滚轮 打开命令提示符,然后导航到下载滚轮的文件夹。运行命令:pip install [wheel的文件名],包括扩展名(.whl)。 从以下位置下载SciPy轮子: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy (类似于上述步骤)。 如上所述,pip install [wheel的文件名]