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

这里写自定义目录标题


在更新完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
在这里插入图片描述
于是成功!!

  • 17
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
解决引用中的错误"AttributeError: module 'tensorflow.compat.v1' has no attribute 'contrib'",您可以尝试使用以下方法来解决问题: 1. 检查您使用的tensorflow版本,确保您使用的是兼容contrib库的版本。如果您使用的是tensorflow2.x版本,那么contrib库已被移除,您需要修改代码以适应新的API。如果您使用的是tensorflow1.x版本,则可以尝试更新tensorflow解决问题。 2. 如果您确定您的tensorflow版本是兼容contrib库的,但仍然出现该错误,请检查您的导入语句是否正确。确保使用正确的import语句导入contrib模块,例如"import tensorflow.contrib"或"from tensorflow.contrib import xxx"。 对于引用中的错误"AttributeError: module 'PIL.ImageOps' has no attribute 'exif_transpose'",您可以尝试解决方法如下: 1. 检查您使用的Pillow库的版本,确保您使用的是最新版本。您可以使用命令"pip install --upgrade pillow -i https://pypi.tuna.tsinghua.edu.cn/simple"来更新Pillow库。 2. 如果更新Pillow库后仍然出现该错误,请检查您的导入语句是否正确。确保使用正确的import语句导入ImageOps模块,例如"from PIL import ImageOps"。 对于引用中的问题"AttributeError: module 'wandb.sdk' has no attribute 'setupex'",这个错误通常是由于wandb库的版本问题引起的。您可以尝试以下解决方法: 1. 检查您使用的wandb库的版本,确保您使用的是最新版本。您可以使用命令"pip install --upgrade wandb -i https://pypi.tuna.tsinghua.edu.cn/simple"来更新wandb库。 2. 如果更新wandb库后仍然出现该错误,请检查您的导入语句是否正确。确保使用正确的import语句导入wandb模块,例如"import wandb"或"from wandb.sdk import xxx"。 同时,为了检查Appium-Python-Client和selenium是否安装成功,您可以使用以下方法: 1. 使用命令"pip show selenium"来检查selenium库是否已成功安装。 2. 使用命令"pip show Appium-Python-Client"来检查Appium-Python-Client库是否已成功安装。 请根据您的具体情况和错误提示,逐步尝试上述方法来解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [AttributeError: module 'tensorflow.compat.v1' has no attribute '](https://download.csdn.net/download/qq_38766019/86272235)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [python-svg转png-报错-AttributeError: module ‘PIL.ImageOps‘ has no attribute ‘exif_transpose](https://blog.csdn.net/billycoder/article/details/123459190)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Appium问题解决方案(2)- AttributeErrormodule 'appium.webdriver' has no attribute 'Remote'...](https://blog.csdn.net/qq_33801641/article/details/107195659)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值