我需要使用Tensorflow和Tensorflow_Probability。在通过以下命令安装它之后:conda install tensorflow-probability
或pip install --upgrade tensorflow-probability
,我在笔记本中运行它:
import tensorflow_probability as tfp
但它返回以下错误:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-41494c8c96ff> in <module>
----> 1 import tensorflow_probability as tfp
ModuleNotFoundError: No module named 'tensorflow_probability'.
的结果
pip list
如下(相关部分):
tblib 1.3.2
tensorboard 1.13.1
tensorflow 1.13.1
tensorflow-estimator 1.13.0
tensorflow-probability 0.7.0
termcolor 1.1.0
terminado 0.8.1
testpath 0.4.2
tfp-nightly 0.8.0.dev20190708
Theano 1.0.4
toolz 0.9.0
有人能帮我解决这个问题吗(我使用的是Win 10)?
发布于 2019-07-08 21:35:16
您的版本是正确的,您的命令也是正确的。
似乎是其他模块中的不一致导致了这一点。
运行以下命令,然后重试:
pip install -U dm-sonnet==1.23
pip install --upgrade tfp-nightly
参考资料:https://github.com/deepmind/graph_nets/issues/3 https://github.com/tensorflow/probability/issues/103
发布于 2019-10-13 14:20:37
tensorflow-probability 0.7.0不兼容: tensorflow 1.13.1查看tensoflow-probability版本发布页面https://github.com/tensorflow/probability/releases
正确的解决方案是要么将tensorflow升级到1.14.0,要么将tensorflow概率降级到0.6.0
pip install -U tensorflow-probability==0.6.0
发布于 2021-03-29 09:15:08
作为前面的回答,您必须通过以下页面找到与您的TensorFlow版本兼容的版本:https://github.com/tensorflow/probability/releases
https://stackoverflow.com/questions/56935876
复制相似问题