报错解决:ImportError: This version of TensorFlow Probability requires TensorFlow version >= 2.10

Python运行程序报错:

ImportError: This version of TensorFlow Probability requires TensorFlow version >= 2.10; Detected an installation of version 2.6.2 Please upgrade TensorFlow to proceed.

解决方案:

在Linux系统中,使用命令查看安装的tensorflow版本:

pip show tensorflow

报错解决:ImportError: This version of TensorFlow Probability requires TensorFlow version >= 2.10_第1张图片
但是实际上,我安装的tensorflow-probability版本是0.18
经过查看,tensorflow与tensorflow-probability对应版本的网址,得到我的这个tensorflow的版本应当对应的tensorflow-probability的版本应该是0.14。

实际上,报错原因是安装的tensorflow-probability版本太新,与tensorflow不能匹配所以报错。
重新安装tensorflow-probability即可。

pip uninstall tensorflow-probability
pip install tensorflow-probability==0.14

你可能感兴趣的:(Python,之各类库的安装,tensorflow,python,人工智能)