简体   繁体   中英

problem with importing tensorflow probability

I am using Anaconda and Ubuntu 18.04. I installed TensorFlow probability base on Anaconda's command:

 conda install -c conda-forge tensorflow-probability 

but when I wanted to import TensorFlow probability, I faced with below error:

ImportError: cannot import name 'compiler' from 'tensorflow.python.autograph.pyct' (/home/alireza/anaconda3/envs/tf-gpu/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/ init .py)

I check Anaconda by conda list tensorflow and TensorFlow probability version 0.8 was installed.

I appreciate your suggestion.

I think it's been a long time since the conda recipe for TFP was updated (TFP is now at 0.12), so you would need to ensure the version of TensorFlow you have is compatible. FWIW from the 0.8 release notes: "It is tested and stable against TensorFlow version 2.0.0 and 1.15.0rc1."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM