tensorflow package installation issue

I'm trying to install and load keras and tensorflow in RStudio. I'm using the most current version of R (Version 4.0.2) and RStudio (Version 1.3.1093). I also installed Anaconda and updated Conda to Version 4.8.5. When I try to install and load, I get the warnings and error message below. My questions are

  1. Why am I getting the warning despite having installed the latest version of Conda?
  2. Why does "installation complete" when I run install_tensorflow , but when I run tf$tenserflow("Hello World!"), I get an error stating "TensorFlow not found"?

Thank you in advance.

> library(keras)
> library(tensorflow)
> install_tensorflow()
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done


==> WARNING: A newer version of conda exists. <==
  current version: 4.8.3
  latest version: 4.8.5

Please update conda by running

    $ conda update -n base -c defaults conda



# All requested packages already installed.

Requirement already up-to-date: tensorflow==2.2.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (2.2.0)
Requirement already satisfied, skipping upgrade: protobuf>=3.8.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (3.13.0)
Requirement already satisfied, skipping upgrade: termcolor>=1.1.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (1.1.0)
Requirement already satisfied, skipping upgrade: six>=1.12.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (1.14.0)
Requirement already satisfied, skipping upgrade: grpcio>=1.8.6 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (1.32.0)
Requirement already satisfied, skipping upgrade: opt-einsum>=2.3.2 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (3.3.0)
Requirement already satisfied, skipping upgrade: h5py<2.11.0,>=2.10.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (2.10.0)
Requirement already satisfied, skipping upgrade: google-pasta>=0.1.8 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (0.2.0)
Requirement already satisfied, skipping upgrade: tensorflow-estimator<2.3.0,>=2.2.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (2.2.0)
Requirement already satisfied, skipping upgrade: gast==0.3.3 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (0.3.3)
Requirement already satisfied, skipping upgrade: wrapt>=1.11.1 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (1.12.1)
Requirement already satisfied, skipping upgrade: astunparse==1.6.3 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (1.6.3)
Requirement already satisfied, skipping upgrade: scipy==1.4.1; python_version >= "3" in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (1.4.1)
Requirement already satisfied, skipping upgrade: numpy<2.0,>=1.16.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (1.18.1)
Requirement already satisfied, skipping upgrade: tensorboard<2.3.0,>=2.2.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (2.2.2)
Requirement already satisfied, skipping upgrade: wheel>=0.26; python_version >= "3" in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (0.34.2)
Requirement already satisfied, skipping upgrade: keras-preprocessing>=1.1.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (1.1.2)
Requirement already satisfied, skipping upgrade: absl-py>=0.7.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorflow==2.2.0) (0.10.0)
Requirement already satisfied, skipping upgrade: setuptools in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from protobuf>=3.8.0->tensorflow==2.2.0) (46.1.3.post20200330)
Requirement already satisfied, skipping upgrade: google-auth-oauthlib<0.5,>=0.4.1 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (0.4.1)
Requirement already satisfied, skipping upgrade: markdown>=2.6.8 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (3.2.2)
Requirement already satisfied, skipping upgrade: tensorboard-plugin-wit>=1.6.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (1.7.0)
Requirement already satisfied, skipping upgrade: requests<3,>=2.21.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (2.24.0)
Requirement already satisfied, skipping upgrade: werkzeug>=0.11.15 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (1.0.1)
Requirement already satisfied, skipping upgrade: google-auth<2,>=1.6.3 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (1.21.3)
Requirement already satisfied, skipping upgrade: requests-oauthlib>=0.7.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (1.3.0)
Requirement already satisfied, skipping upgrade: importlib-metadata; python_version < "3.8" in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from markdown>=2.6.8->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (2.0.0)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (3.0.4)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (1.25.10)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (2020.6.20)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (2.10)
Requirement already satisfied, skipping upgrade: rsa<5,>=3.1.4; python_version >= "3.5" in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (4.6)
Requirement already satisfied, skipping upgrade: pyasn1-modules>=0.2.1 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (0.2.8)
Requirement already satisfied, skipping upgrade: cachetools<5.0,>=2.0.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (4.1.1)
Requirement already satisfied, skipping upgrade: oauthlib>=3.0.0 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (3.1.0)
Requirement already satisfied, skipping upgrade: zipp>=0.5 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from importlib-metadata; python_version < "3.8"->markdown>=2.6.8->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (3.2.0)
Requirement already satisfied, skipping upgrade: pyasn1>=0.1.3 in c:\users\owner\appdata\local\r-mini~1\envs\r-reti~1\lib\site-packages (from rsa<5,>=3.1.4; python_version >= "3.5"->google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow==2.2.0) (0.4.8)

Installation complete.


Restarting R session...

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

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

You can install TensorFlow using the install_tensorflow() function.

Anaconda is a brilliant package manager for Python. It is a consistent failure for R.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Yes, this entire process of trying to use keras in R has been a waste of time. I'm switching to python for ML applications.