在Windows 10(Python 3.5.3)上通过TensorFlow安装Keras [英] Installing Keras over TensorFlow on Windows 10 (Python 3.5.3)

查看:159
本文介绍了在Windows 10(Python 3.5.3)上通过TensorFlow安装Keras的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows 10上安装Keras,但在搜索已安装的SciPy时出现以下错误:

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

有什么想法吗? SciPy安装本身可以完美运行.

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

推荐答案

您是否安装了任何"lapack/blas"库?

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

如果没有,则应安装它.您可以尝试英特尔的MKL.或者,您也可以尝试从此链接中获取"Numpy"和"Scipy",其中包含必需的内容:

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/

但是:

请勿在名称中包含空格的文件夹中安装任何内容.用户文件夹无空格

.

检查numpy配置:

import numpy as np
np.__config__.show()

它应该告诉您lapack/blas的安装位置.

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']

关于我的情况,我创建了一个文件夹"LinkToProgramFilesX86".该文件夹是指向常规"Program Files"文件夹的符号链接,该文件夹包含空格.由于空间原因,我必须创建符号链接.

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.

要创建符号链接,请在此处检查:在优化theano中的卷积的同时接收AssertionError

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

这篇关于在Windows 10(Python 3.5.3)上通过TensorFlow安装Keras的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆