报错信息
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-5760b1005439> in <module>()
4 import time
5 import itertools as it
----> 6 import tensorflow.compat.v1 as tf
7 tf.disable_v2_behavior()
8
ModuleNotFoundError: No module named 'tensorflow.compat'
解决方法
$ pip uninstall tensorflow
$ pip install tensorflow==2.3.1 -i https://pypi.douban.com/simple
2.2.0也可以使用
欢迎大家交流学习,任何问题都可以留言