【发布时间】:2017-12-14 10:33:14
【问题描述】:
我正在尝试安装 Keras 包以使用机器学习工具。 不幸的是,我无法这样做。我已经安装了theano。我在 python 3.5 的单独环境中安装了 tensorflow,但我正在尝试为此使用 python 2.7。是这个问题吗?
C:\Users\User>pip install tensorflow
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
C:\Users\User>pip install keras
Requirement already satisfied: keras in c:\users\user\anaconda2\lib\site-packages
Requirement already satisfied: theano in c:\users\user\anaconda2\lib\site-packages (from keras)
Requirement already satisfied: pyyaml in c:\users\user\anaconda2\lib\site-packages (from keras)
Requirement already satisfied: six in c:\users\user\anaconda2\lib\site-packages (from keras)
Requirement already satisfied: numpy>=1.9.1 in c:\users\user\anaconda2\lib\site-packages (from theano->keras)
Requirement already satisfied: scipy>=0.14 in c:\users\user\anaconda2\lib\site-packages (from theano->keras)
当我尝试导入 keras 时,我仍然遇到导入错误,说没有找到 tensorflow 后端
【问题讨论】:
-
说已经安装了keras,那么实际问题是什么?
-
你真的尝试过使用 Keras 吗?好像已经安装好了,用Theano con你的
config文件 -
是的,我无法导入 keras。说找不到支持的 tensorflow
-
如果您尝试为 python 2 安装 keras + tensorflow,那么它将无法工作,因为 tensorflow 支持 python 3。所以,如果您使用的是 python 2,那么最好使用 Theano 作为后端。
标签: python machine-learning neural-network keras theano