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

Error: Installation of TensorFlow not found #1106

Open
Stat45 opened this issue Aug 13, 2020 · 5 comments
Open

Error: Installation of TensorFlow not found #1106

Stat45 opened this issue Aug 13, 2020 · 5 comments

Comments

@Stat45
Copy link

Stat45 commented Aug 13, 2020

Dear all,

I've tried a whole day installing keras and tensorflow on my computer yesterday (and actually on a second PC), read all (at least many) posts reporting the same problem but none of them helped me to solve my issue.

Following the tutorial on my PC (Win10, R-studio version 4.0.2, R version 3.5.1 but also 4.0.2; installing miniconda but also Anaconda3), I invariably received the following error message (although of course I had already used the install_tensorflow function that confirmed the installation was complete) :

tf$constant("Hellow Tensorflow")
Error: Installation of TensorFlow not found.

Python environments searched for 'tensorflow' package:
C:\Users...\AppData\Local\r-miniconda\envs\r-reticulate\python.exe

You can install TensorFlow using the install_tensorflow() function.

Would you have any idea for fixing the bug?

Thanks!

@nagdevAmruthnath
Copy link

Here are a few things you could try

  1. See if python.exe is in you path
  2. Be sure you installed python 3.x
  3. Keras uses reticulate to connect to python. So mention the path to python specifically

If none of these work, install docker and just run rocker's ML container with Rstudio. That will reduce all the hassle. rocker/ml

@max-poltora

This comment has been minimized.

@max-poltora
Copy link

Here are a few things you could try

  1. See if python.exe is in you path
  2. Be sure you installed python 3.x
  3. Keras uses reticulate to connect to python. So mention the path to python specifically

I've made sure, that C:/Users/user/anaconda3/python.exe is in the PATH, but the error is still there.

@max-poltora
Copy link

max-poltora commented Oct 27, 2020

Dear all, I have found the solution in this branch. The method works in my case, but I have to do manipulations with installation every time I start new R session. In summary I do the following steps:

library(keras)
use_condaenv("tf")
library(reticulate)
install_keras(method = c("conda"), conda = "auto", version = "default", tensorflow = "gpu")

After that I load Anaconda prompt and run:

conda activate tf
conda create -y --name tf tensorflow-gpu python=3.6.8
conda activate tf

Then, when I get back to my R session I get the following output:
tensorflow::tf_config()

TensorFlow v2.1.0 (C:\Users\user\ANACON~1\envs\tf\lib\site-packages\tensorflow_init_.p)
Python v3.6 (C:/Users/user/anaconda3/envs/tf/python.exe)

keras:::keras_version()

[1] ‘2.2.4’

reticulate::py_config()

python: C:/Users/user/anaconda3/envs/tf/python.exe
libpython: C:/Users/user/anaconda3/envs/tf/python36.dll
pythonhome: C:/Users/user/anaconda3/envs/tf
version: 3.6.8 |Anaconda, Inc.| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]
Architecture: 64bit
numpy: C:/Users/user/anaconda3/envs/tf/Lib/site-packages/numpy
numpy_version: 1.19.2
tensorflow: C:\Users\user\ANACON~1\envs\tf\lib\site-packages\tensorflow_init_.p

python versions found:
C:/Users/user/anaconda3/envs/tf/python.exe
C:/Users/user/anaconda3/python.exe

Hope this helps.

@ykocaturk
Copy link

There should be no selections in the Python section in the Tools menu Global options tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants