无法使用Python 2.7在conda上安装Keras

时间:2017-11-13 19:09:58

标签: python-2.7 keras anaconda

我在Windows 10 64位上安装了Anaconda 5.0.1,使用Python 2.7(是的,我知道......请不要问:)我无法在我的机器上安装Keras:

(C:\ProgramData\Anaconda2) C:\...\Documents>conda install keras
Fetching package metadata .............
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - keras -> python >=3.5,<3.6.0a0
  - keras -> tensorflow -> html5lib ==0.9999999
  - python 2.7*
Use "conda info <package>" to see the dependencies for each package.

使用conda info keras

(C:\ProgramData\Anaconda2) C:\...\Documents>conda info keras
Fetching package metadata .............

keras 2.0.8 py36h65e7a35_0
--------------------------
file name   : keras-2.0.8-py36h65e7a35_0.tar.bz2
name        : keras
version     : 2.0.8
build string: py36h65e7a35_0
build number: 0
channel     : defaults
size        : 419 KB
arch        : None
license     : MIT
license_family: MIT
md5         : 3caf1415f85ea20314990f3de7dfc189
noarch      : None
platform    : None
subdir      : win-64
timestamp   : 1508953117568
url         : https://repo.continuum.io/pkgs/main/win-64/keras-2.0.8-py36h65e7a35_0.tar.bz2
dependencies:
    h5py
    numpy >=1.9.1
    python >=3.6,<3.7.0a0
    pyyaml
    scipy >=0.14
    six >=1.9.0
    tensorflow

keras 2.0.8 py35h15001cb_0
--------------------------
file name   : keras-2.0.8-py35h15001cb_0.tar.bz2
name        : keras
version     : 2.0.8
build string: py35h15001cb_0
build number: 0
channel     : defaults
size        : 421 KB
arch        : None
license     : MIT
license_family: MIT
md5         : ca5a05bc857fd4643a68cc82308be03f
noarch      : None
platform    : None
subdir      : win-64
timestamp   : 1508953168861
url         : https://repo.continuum.io/pkgs/main/win-64/keras-2.0.8-py35h15001cb_0.tar.bz2
dependencies:
    h5py
    numpy >=1.9.1
    python >=3.5,<3.6.0a0
    pyyaml
    scipy >=0.14
    six >=1.9.0
    tensorflow

好的,所以似乎Keras需要Python 3. 但是the Keras docsthe Keras GitHub repo都表示Keras兼容:Python 2.7-3.6。我有点惊讶:为什么我不能安装它?有没有可能的解决办法?

0 个答案:

没有答案