python tensorflow 报错

报错信息:
ImportError: cannot import name ‘get_config’ from ‘tensorflow.python.eager.context’
我一级一级跳进去没有找到这个语句的位置。
已经安装
tensorflow=2.4.1
numpy=1.19.5
解决方法:
https://stackoverflow.com/questions/66964492/importerror-cannot-import-name-get-config-from-tensorflow-python-eager-conte
中 的 这一句:
pip install --upgrade tensorflow
本来以为会把tensorflow从2.4更新到2.6,但是发现还是2.4.1,并且问题解决了。

猜你喜欢

转载自blog.csdn.net/weixin_46870583/article/details/120165503