Can't install Tensorflow 1.14 with greta

I’m trying to install tensorflow after having installed greta using the command suggested after loading the library that is supposed to install version 1.14.

This is the error message I get:

> greta::install_tensorflow(extra_packages = "tensorflow-probability", version="1.14.0")
Using virtual environment '~/.virtualenvs/r-reticulate' ...
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at
Collecting tensorflow==1.14.0
  Using cached
Collecting tensorflow-probability
  Using cached
Collecting grpcio>=1.8.6
  Using cached
Collecting mock>=2.0.0
  Using cached
Processing /home/rstudio/.cache/pip/wheels/dd/f2/5d/2689b5547f32c4e258c3b7ccbe7f1d0f2afbb84fb01e830792/Keras_Applications-1.0.8-cp27-none-any.whl
Collecting tensorboard<1.15.0,>=1.14.0
  Using cached
Processing /home/rstudio/.cache/pip/wheels/d7/de/2e/efa132238792efb6459a96e85916ef8597fcb3d2ae51590dfd/wrapt-1.11.2-cp27-cp27mu-linux_x86_64.whl
Collecting protobuf>=3.6.1
  Using cached
Collecting keras-preprocessing>=1.0.5
  Using cached
Processing /home/rstudio/.cache/pip/wheels/59/38/c6/234dc39b4f6951a0768fbc02d5b7207137a5b1d9094f0d54bf/gast-0.3.2-cp27-none-any.whl
Collecting wheel
  Using cached
Collecting numpy<2.0,>=1.14.5
  Using cached
Collecting enum34>=1.1.6
  Using cached
Processing /home/rstudio/.cache/pip/wheels/7c/06/54/bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6/termcolor-1.1.0-cp27-none-any.whl
Collecting six>=1.10.0
  Using cached
Processing /home/rstudio/.cache/pip/wheels/a7/15/a0/0a0561549ad11cdc1bc8fa1191a353efd30facf6bfb507aefc/absl_py-0.8.1-cp27-none-any.whl
Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0
  Using cached
Collecting google-pasta>=0.1.6
  Using cached
Collecting backports.weakref>=1.0rc1
  Using cached
Collecting astor>=0.6.0
  Using cached
Collecting decorator
  Using cached
Collecting cloudpickle==1.1.1
  Using cached
Collecting futures>=2.2.0; python_version < "3.2"
  Using cached
Collecting funcsigs>=1; python_version < "3.3"
  Using cached
Collecting h5py
  Using cached
Collecting setuptools>=41.0.0
  Using cached
Collecting werkzeug>=0.11.15
  Using cached
Collecting markdown>=2.6.8
  Using cached
ERROR: tensorflow-gpu 2.0.0 has requirement gast==0.2.2, but you'll have gast 0.3.2 which is incompatible.
ERROR: tensorflow-gpu 2.0.0 has requirement tensorboard<2.1.0,>=2.0.0, but you'll have tensorboard 1.14.0 which is incompatible.
ERROR: tensorflow-gpu 2.0.0 has requirement tensorflow-estimator<2.1.0,>=2.0.0, but you'll have tensorflow-estimator 1.14.0 which is incompatible.
ERROR: tensorflow-probability 0.8.0 has requirement gast<0.3,>=0.2, but you'll have gast 0.3.2 which is incompatible.
Installing collected packages: enum34, six, futures, grpcio, funcsigs, mock, numpy, h5py, keras-applications, setuptools, protobuf, werkzeug, absl-py, wheel, markdown, tensorboard, wrapt, keras-preprocessing, gast, termcolor, tensorflow-estimator, google-pasta, backports.weakref, astor, tensorflow, decorator, cloudpickle, tensorflow-probability
Successfully installed absl-py-0.8.1 astor-0.8.0 backports.weakref-1.0.post1 cloudpickle-1.2.2 decorator-4.4.0 enum34-1.1.6 funcsigs-1.0.2 futures-3.3.0 gast-0.3.2 google-pasta-0.1.7 grpcio-1.24.1 h5py-2.10.0 keras-applications-1.0.8 keras-preprocessing-1.1.0 markdown-3.1.1 mock-3.0.5 numpy-1.16.5 protobuf-3.10.0 setuptools-41.4.0 six-1.12.0 tensorboard-2.0.0 tensorflow-2.0.0 tensorflow-estimator-2.0.0 tensorflow-probability-0.8.0 termcolor-1.1.0 werkzeug-0.16.0 wheel-0.33.6 wrapt-1.11.2

Installation complete.

Restarting R session...

Failed to import TensorFlow. Please note that TensorFlow is not installed by default when you install TensorFlow Probability. This is so that users can decide whether to install the GPU-enabled TensorFlow package. To use TensorFlow Probability, please install the most recent version of TensorFlow, by following instructions at

If instead, I install tensorflow with install_tensorflow( method = "conda", extra_packages = "tensorflow-probability" ), then tensorflow 2.0 is successfully installed but, as expected, greta can’t work with 2.0 yet.

Hi! Could you please try installing the development version of greta from GitHub and following the tensorflow installation instructions it gives you. Please let me know how you get on here.

A new version of tensorflow probability was released which depends on TF2.0, so we now need to explicitly state the version of tensorflow probability to install. The latest version of greta should have the correct instructions.

That worked!

For reference, this is what I did:

# uninstall greta and tensorflow

# install greta's development version

# load greta and copy paste the tensorflow installation instruction's given in the terminal

    method = "conda",
    version = "1.14.0",
    extra_packages = "tensorflow-probability==0.7.0"

Thanks, nick!