Monday, March 12, 2018

Install keras and tensorflow using Rstudio

Leave a Comment

While trying to following the instructions of installing Keras and TensorFlow on Rstudio link https://keras.rstudio.com/index.html I get the following error. It is a work computer that is running Windows 7. I am not familiar with python, but I believe I have python 3.6 installed correctly (I am able to run simple python code in the Spyder IDE). Thanks in advance for any suggestions on how to get this working.

> install_keras() Creating r-tensorflow conda environment for TensorFlow installation... Solving environment: ...working... failed  CondaHTTPError: HTTP 000 CONNECTION FAILED for url  <https://repo.continuum.io/pkgs/main/noarch/repodata.json.bz2>  Elapsed: -  An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your  way. ConnectionError(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io', port=443): Max retries exceeded with url: /pkgs/main/noarch/repodata.json.bz2 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000000000474D860>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))",),)   Error: Error 1 occurred creating conda environment r-tensorflow In addition: Warning message: running command '"C:\Users\...\...\Local\CONTIN~1\ANACON~1\Scripts\conda.exe" "create" "--yes" "--name" "r-tensorflow" "python=3.6"' had status 1  

1 Answers

Answers 1

Installing Keras and TensorFlow using install_keras() isn't required to use the Keras R package. You can do a custom installation of Keras (and desired backend) as described on the Keras website and the Keras R package will find and use that version.

Source

So you can circumvent this issue with the firewall using a custom installation. The R package keras will then find that installation automatically. See the linked source for more information on how to do a custom installation.

edit: btw, there is a similar question that has been answered here. That poster goes into changing the proxy settings to cicrumvent the firewall. I cannot mark this question as a duplicate due to active bounty.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment