R keras软件包错误:找不到Python模块tensorflow.contrib.keras.python.keras [英] R keras package Error: Python module tensorflow.contrib.keras.python.keras was not found
本文介绍了R keras软件包错误:找不到Python模块tensorflow.contrib.keras.python.keras的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在R中从GitHub上通过devtools
安装了keras
,在Python中安装了TensorFlow.
I have keras
installed with devtools
from GitHub in R and TensorFlow installed in Python.
但是,当我运行示例Keras命令时:
However when I run an example Keras command like:
model <- keras_model_sequential()
我得到以下信息:
错误:Python模块tensorflow.contrib.keras.python.keras不是 找到了.
Error: Python module tensorflow.contrib.keras.python.keras was not found.
Detected Python configuration:
python: C:\Python35\python.exe
libpython: C:/Python35/python35.dll
pythonhome: C:\Python35
version: 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)]
Architecture: 64bit
numpy: C:\Python35\lib\site-packages\numpy
numpy_version: 1.13.0
tensorflow: C:\Python35\lib\site-packages\tensorflow
python versions found:
C:\Python35\python.exe
C:\Python27\\python.exe
C:\Python35\\python.exe
C:\Python36\\python.exe
推荐答案
我遇到了类似的问题.重新启动rstudio,加载keras和tensorflow库,然后键入use_condaenv("r-tensorflow")
.这为我解决了.
I had a similar problem. Restart rstudio, load keras and tensorflow libraries, and type use_condaenv("r-tensorflow")
. That fixed it for me.
这篇关于R keras软件包错误:找不到Python模块tensorflow.contrib.keras.python.keras的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文