1

I'm trying to install Keras on Windows 10 but I get the following error while searching for the installed SciPy:

Installed c:\users\MY_USER\appdata\local\programs\python\python35\lib\site-packages\keras
Processing dependencies for Keras==2.0.4
Searching for scipy>=0.14
Reading https://pypi.python.org/simple/scipy/
Downloading https://pypi.python.org/packages/e5/93/9a8290e7eb5d4f7cb53b9a7ad7b92b9827ecceaddfd04c2a83f195d8767d/scipy-0.19.0.zip#md5=91b8396231eec780222a57703d3ec550
Best match: scipy 0.19.0
Processing scipy-0.19.0.zip
Writing c:\users\MY_USER\appdata\local\temp\easy_install-an2sfx\scipy-0.19.0\setup.cfg
Running scipy-0.19.0\setup.py -q bdist_egg --dist-dir c:\users\MY_USER\appdata\local\temp\easy_install-an2sfx\scipy-0.19.0\egg-dist-tmp-zy7oqf
c:\users\MY_USER\appdata\local\temp\easy_install-an2sfx\scipy-0.19.0\setup.py:323: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
  warnings.warn("Unrecognized setuptools command, proceeding with "
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.11.38-sse2-64\lib is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
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__)
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__)
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__)
Running from scipy source directory.
non-existing path in 'scipy\\integrate': 'quadpack.h'
error: no lapack/blas resources found

Any idea what is wrong? SciPy installation itself works perfectly.

valiano
  • 16,433
  • 7
  • 64
  • 79
Gabizon
  • 339
  • 4
  • 15

1 Answers1

1

Did you install any "lapack/blas" library??

If not, you should install it. You could try MKL from Intel. Or you could try just getting "Numpy" and "Scipy" from this link, which come with what is necessary: http://www.lfd.uci.edu/~gohlke/pythonlibs/

But:

Don't install anything in folders containing spaces in their names. User folders without spaces

.

If you already have blas/lapack installed in folders with spaces:

Check numpy configuration:

import numpy as np
np.__config__.show()

It should tell you where lapack/blas is installed.

You should see something like this:

lapack_opt_info:
    library_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
blas_opt_info:
    library_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
lapack_mkl_info:
    library_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
blas_mkl_info:
    library_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['C:/LinkToProgramFilesX86/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']

Notice in my case I created a folder "LinkToProgramFilesX86". This folder is a symbolic link to the regular "Program Files" folder, which contains spaces. I have to create the symbolic link because of the space.

To create symbolic links, check here: Receive AssertionError while optimizing convolution in theano

Community
  • 1
  • 1
Daniel Möller
  • 84,878
  • 18
  • 192
  • 214