R keras package Error: python module tensorflow.contrib.keras.python.keras not found

I have keras

installed devtools

from GitHub in R and TensorFlow installed in Python.

However, when I run Keras command like:

model <- keras_model_sequential() 

      

I get the following:

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

      

+5


source to share


4 answers


I had a similar problem. Restart rstudio, load kera and tensorflow libraries and enter use_condaenv("r-tensorflow")

. This fixed it for me.



+4


source


You can first install the R tensorflow package from here .

Then you can simply install the latest tensorflow using the install_tensorflow function as shown in this answer .



After that, just install and update the R-keras library. It should now be using the latest version of TensorFlow and that could potentially solve your problem. Also, make sure you have installed the tensorflow version that matches your Python version.

+3


source


I experienced a similar problem. The issue was resolved by updating tensorflow module from 1.0.1 to 1.2.1

0


source


I ran into a problem, the question is: who can tell me the answer? Thank you from my betta my heart

Error: The kython Python module was not found.

Defined Python config:

python: C: \ Users \ 123 \ ANACON ~ 2 \ python.exe libpython: C: /Users/123/ANACON~2/python36.dll pythonhome: C: \ Users \ 123 \ ANACON ~ 2 version: 3.6.5 | Anaconda, Inc. | (default, March 29, 2018 1:32:41 PM) [MSC v.1900 64 bit (AMD64)] Architecture: 64 bit numpy: C: \ Users \ 123 \ ANACON ~ 2 \ lib \ site-packages \ numpy numpy_version : 1.14.3 keras: [NOT FOUND]

python versions found: C: \ Users \ 123 \ ANACON ~ 2 \ python.exe C: \ Users \ 123 \ ANACON ~ 1 \ python.exe

0


source







All Articles