AttributeError: module ‘google.protobuf.internal.containers‘ has no attribute ‘MutableMapping‘问题解决

AttributeError: module ‘google.protobuf.internal.containers‘ has no attribute ‘MutableMapping‘问题解决,第1张

这里写自定义目录标题
在更新完conda和所有包以后,我导入tensorflow出现以下错误:
AttributeError: module ‘google.protobuf.internal.containers’ has no attribute ‘MutableMapping’

求助网络大佬,发现可能是版本不一致导致的问题,解决办法详见:
https://blog.csdn.net/qq_38335768/article/details/121283297
但我查了自己的版本都是一致的

于是又在GitHub上找到解决方案,详见:
https://github.com/protocolbuffers/protobuf/issues/9409

主要就是在本地文件’C:/Users/user/anaconda3/Lib/site-packages/google/protobuf/internal/container.py’中添加一行代码:
from collections.abc import MutableMapping

于是成功!!

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/870854.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-13
下一篇2022-05-13

发表评论

登录后才能评论

评论列表(0条)

    保存