Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of Tensorflow & Keras for R under RStudio fails. #702

Closed
faltinl opened this issue Jan 23, 2020 · 1 comment
Closed

Installation of Tensorflow & Keras for R under RStudio fails. #702

faltinl opened this issue Jan 23, 2020 · 1 comment

Comments

@faltinl
Copy link

faltinl commented Jan 23, 2020

System information

  • OS Platform and Distribution: x86_64-w64-mingw32/x64 (64-bit) under Win10 x64 (build 18363)
  • TensorFlow: installed binary under Rstudio 1.2.5033, R 3.6.2 (20191212) &
    Miniconda3 4.7.12 (Py 3.7.4-64bit)
  • TensorFlow version: 2.0.0
  • Python version: 3.6.10 (under conda)
  • Installed using virtualenv? pip? conda?: conda

Describe the problem
Since I used Keras for R (including Reticulate & Tensorflow) for the last 3 yrs under RStudio, but had various problems with my very old installation, I definitely want to continue with Tensorflow + Keras for R under RStudio as until now and tried to update with tensorflow 2.0.0. as outlined under RStudio:

install.packages("tensorflow", version = "2.0.0.") # installs package reticulate 1.14 too 
library(tensorflow)
install_tensorflow(method = "conda")  
...
Successfully installed absl-py-0.9.0 astor-0.8.1 cachetools-4.0.0 chardet-3.0.4 gast-0.2.2 google-auth-1.10.1 
google-auth-oauthlib-0.4.1 google-pasta-0.1.8 grpcio-1.26.0 h5py-2.10.0 idna-2.8 keras-applications-1.0.8 keras-preprocessing-1.1.0 
markdown-3.1.1 numpy-1.18.1 oauthlib-3.1.0 opt-einsum-3.1.0 protobuf-3.11.2 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.22.0 
requests-oauthlib-1.3.0 rsa-4.0 six-1.14.0 tensorboard-2.0.2 tensorflow-2.0.0 tensorflow-estimator-2.0.1 termcolor-1.1.0 
urllib3-1.25.8 werkzeug-0.16.0 wrapt-1.11.2
Installation complete.

Then test sequence - is tensorflow installed & working?

library(reticulate)
use_condaenv(condaenv = "r-reticulate", required = TRUE)
library(tensorflow)     
> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] reticulate_1.14  tensorflow_2.0.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3        rstudioapi_0.10   whisker_0.4      
 [4] magrittr_1.5      rappdirs_0.3.1    usethis_1.5.1    
 [7] devtools_2.2.1    pkgload_1.0.2     R6_2.4.1         
[10] rlang_0.4.2       fansi_0.4.1       tools_3.6.2      
[13] pkgbuild_1.0.6    sessioninfo_1.1.1 cli_2.0.1        
[16] withr_2.1.2       remotes_2.1.0     ellipsis_0.3.0   
[19] tfruns_1.4        rprojroot_1.3-2   assertthat_0.2.1 
[22] digest_0.6.23     crayon_1.3.4      processx_3.4.1   
[25] callr_3.4.0       fs_1.3.1          base64enc_0.1-3  
[28] ps_1.3.0          memoise_1.1.0     glue_1.3.1       
[31] compiler_3.6.2    backports_1.1.5   desc_1.2.0       
[34] prettyunits_1.1.0 jsonlite_1.6     
> reticulate::py_config()
python:         C:/.../Miniconda3/envs/r-reticulate/python.exe
libpython:      C:/.../Miniconda3/envs/r-reticulate/python36.dll
pythonhome:     C:/.../Miniconda3/envs/r-reticulate
version:        3.6.10 |Anaconda, Inc.| (default, Jan  7 2020, 15:18:16) [MSC v.1916 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:/.../Miniconda3/envs/r-reticulate/Lib/site-packages/numpy
numpy_version:  1.18.1
tensorflow:     C:\...\MINICO~1\envs\R-RETI~1\lib\site-packages\tensorflow\__init__.p
python versions found: 
 C:/.../Miniconda3/envs/r-reticulate/python.exe
 C:/.../Miniconda3/python.exe
> tensorflow::tf_config()
**Installation of TensorFlow not found.**
Python environments searched for 'tensorflow' package:
 C:\...\Miniconda3\envs\r-reticulate\python.exe
 C:\...Miniconda3\python.exe
**You can install TensorFlow using the install_tensorflow() function.**

Thus, although the installation was indicated to be correctly terminated, tensorflow was not found, i.e. not working. Unfortunately, even an attempt to reset the complete system into status quo ante failed although a complete backup is available, because the system apparently doesn't (cannot?) reconfigure the previous components and setup in complete working condition. As a matter of fact - I am trapped...

@skeydan
Copy link

skeydan commented Jan 23, 2020

rstudio/keras#964

tensorflow/tensorflow#36138

Like I say in the other issues, this really has to be investigated from the Python side first... Unless it works from Python, it cannot work from R.

@skeydan skeydan closed this as completed Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants