scipy: I fail to install Scipy by pip, can you help me?

What’s wrong?

I use python 2.7.11

C:\Program Files\Python\2.x\Scripts>pip install scipy
Collecting scipy
  Using cached scipy-0.17.0.tar.gz
Installing collected packages: scipy
  Running setup.py install for scipy ... error
    Complete output from command "c:\program files\python\2.x\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\reacodes\\appdata\\local\\temp\\pip-build-jzv_lz\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\reacodes\appdata\local\temp\pip-mqeonc-record\install-record.txt --single-version-externally-managed --compile:
    lapack_opt_info:
    openblas_lapack_info:
      libraries openblas not found in ['c:\\program files\\python\\2.x\\lib', 'C:\\', 'c:\\program files\\python\\2.x\\libs']
      NOT AVAILABLE

    lapack_mkl_info:
    mkl_info:
      libraries mkl,vml,guide not found in ['c:\\program files\\python\\2.x\\lib', 'C:\\', 'c:\\program files\\python\\2.x\\libs']
      NOT AVAILABLE

      NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    c:\program files\python\2.x\lib\site-packages\numpy\distutils\system_info.py:635: UserWarning: Specified path C:\projects\np-wheel-builder\atlas-builds\atlas-3.11.38-sse2-64\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:\program files\python\2.x\lib\site-packages\numpy\distutils\system_info.py:1552: 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:\\program files\\python\\2.x\\lib', 'C:\\', 'c:\\program files\\python\\2.x\\libs']
      NOT AVAILABLE

    c:\program files\python\2.x\lib\site-packages\numpy\distutils\system_info.py:1563: 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:\program files\python\2.x\lib\site-packages\numpy\distutils\system_info.py:1566: 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\reacodes\appdata\local\temp\pip-build-jzv_lz\scipy\setup.py", line 265, in <module>
        setup_package()
      File "c:\users\reacodes\appdata\local\temp\pip-build-jzv_lz\scipy\setup.py", line 262, in setup_package
        setup(**metadata)
      File "c:\program files\python\2.x\lib\site-packages\numpy\distutils\core.py", line 135, in setup
        config = configuration()
      File "c:\users\reacodes\appdata\local\temp\pip-build-jzv_lz\scipy\setup.py", line 182, in configuration
        config.add_subpackage('scipy')
      File "c:\program files\python\2.x\lib\site-packages\numpy\distutils\misc_util.py", line 1002, in add_subpackage
        caller_level = 2)
      File "c:\program files\python\2.x\lib\site-packages\numpy\distutils\misc_util.py", line 971, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\program files\python\2.x\lib\site-packages\numpy\distutils\misc_util.py", line 908, 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:\program files\python\2.x\lib\site-packages\numpy\distutils\misc_util.py", line 1002, in add_subpackage
        caller_level = 2)
      File "c:\program files\python\2.x\lib\site-packages\numpy\distutils\misc_util.py", line 971, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\program files\python\2.x\lib\site-packages\numpy\distutils\misc_util.py", line 908, 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:\program files\python\2.x\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\reacodes\\appdata\\local\\temp\\pip-build-jzv_lz\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\reacodes\appdata\local\temp\pip-mqeonc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\reacodes\appdata\local\temp\pip-build-jzv_lz\scipy\

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

It worked for me:

  1. Download numpy+mkl wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy. Use the version that is the same as your python version (check using python --version or python -V). Eg. if your python is 3.5.2, download the wheel which shows cp35
  2. Open command prompt and navigate to the folder where you downloaded the wheel. Run the command: pip install [file name of wheel], including the extension (.whl).
  3. Download the SciPy wheel from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy (similar to the step above).
  4. As above, pip install [file name of wheel]

@cyslug Using your method, I have solved this problem. Thank you!😘

Scipy has dependencies outside Python which pip was not able to find on your system.

The easiest fix is probably to install scipy using anaconda, which comes bundled with all required dependencies.

@cyslug you nailed if

For linux, the atlas-devel is required to fix the issue of “numpy.distutils.system_info.NotFoundError: no lapack/blas resources found”. For windows, a good reference might be https://www.scipy.org/scipylib/building/windows.html#atlas-and-lapack

@nehahooda hell yeah.

@cyslug Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32. GOT IT …I need packages of 32 bit not of the 64 bit.

@nehahooda Probably you have a 32-bit OS. But in any case consider switching to Python 3