rstudio / keras3

R Interface to Keras
https://keras3.posit.co/
Other
837 stars 283 forks source link

ModuleNotFoundError: No module named 'rpytools' / Python module keras was not found. #346

Closed MFA-bmayer closed 6 years ago

MFA-bmayer commented 6 years ago

Hello,

I've run into an issue I haven't seen answered anywhere, coupled with what appears to be a common issue.

Both occur in the following code after running library(keras) then install_keras():

mnist <- dataset_mnist()

Error: ModuleNotFoundError: No module named 'rpytools'
model <- keras_model_sequential() %>%
  layer_flatten(input_shape = c(lookback / step, dim(data)[-1])) %>%
  layer_dense(units = 32, activation = "relu") %>%
  layer_dense(units = 1)

Error: Python module keras was not found.
reticulate::py_discover_config("keras")

python:         C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1\python.exe
libpython:      C:/Users/BMayer/AppData/Local/CONTIN~1/ANACON~2/envs/R-TENS~1/python36.dll
pythonhome:     C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1
version:        3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1\lib\site-packages\numpy
numpy_version:  1.13.3
keras:          C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1\lib\site-packages\keras

python versions found: 
 C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1\python.exe
 C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\python.exe
 C:\Users\BMayer\AppData\Local\Continuum\anaconda3\python.exe
 C:\Users\BMayer\AppData\Local\Continuum\anaconda3\envs\r-tensorflow\python.exe
reticulate::py_discover_config("tensorflow")

python:         C:\Users\BMayer\AppData\Local\Continuum\anaconda3\envs\r-tensorflow\python.exe
libpython:      C:/Users/BMayer/AppData/Local/Continuum/anaconda3/envs/r-tensorflow/python36.dll
pythonhome:     C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1
version:        3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1\lib\site-packages\numpy
numpy_version:  1.13.3
tensorflow:     C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1\lib\site-packages\tensorflow

python versions found: 
 C:\Users\BMayer\AppData\Local\Continuum\anaconda3\envs\r-tensorflow\python.exe
 C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\envs\R-TENS~1\python.exe
 C:\Users\BMayer\AppData\Local\CONTIN~1\ANACON~2\python.exe
 C:\Users\BMayer\AppData\Local\Continuum\anaconda3\python.exe
> py_module_available('keras')
[1] FALSE

> py_module_available('tensorflow')
[1] TRUE

I've tried the solutions outlined in the other issues, but none have worked for me. Please let me know if you need any other information.

ronammar commented 6 years ago

Any resolution to this issue?