6

I tried to run a model using TensorFlow Probability.
But when I run it I got the error below:

**ImportError: This version of TensorFlow Probability requires TensorFlow version >= 2.3; Detected an installation of version 2.0.0-beta1. Please upgrade TensorFlow to proceed.**<br>

I cannot install TensorFlow 2.3 because it says there is no match.
I have installed these libraries.

tensorflow (2.0.0b1)
tensorflow-estimator (1.14.0)
tensorflow-tensorboard (1.5.1)
tfp-nightly (0.12.0.dev20200817)

Any suggestion how to fix it?

Thanks in advance

Jimit Vaghela
  • 768
  • 1
  • 8
  • 31
Halan
  • 147
  • 1
  • 1
  • 9

3 Answers3

7

If you did not want to upgrade tensorflow (while my tf version is 2.5.0) then specify the version for tensorflow_probability while installing like:

pip install tensorflow_probability==0.12.2

this works for me.

Ihor Konovalenko
  • 1,298
  • 2
  • 16
  • 21
4

As the error indicates, you must have a version of TensorFlow >= 2.3 to use tensorflow-probability.
Update it to 2.4, if you work with 'pip':

pip install tensorflow==2.4

Oren
  • 976
  • 9
  • 23
1

If you did not want to upgrade tensorflow, you can uninstall tfp and then pip install tensorflow==0.10 which will work (while my enviroment tf==2.2.0)