File "D:\anaconda\envs\python\lib\site-packages\google\protobuf\descriptor.py", line 51, in <module> from google.protobuf.pyext import _message ImportError: DLL load failed while importing _message: 找不到指定的程序。
引用[1]: 这个错误是由于在导入tensorflow包时出现了问题。可能是由于tensorflow和protobuf版本不兼容导致的。你可以尝试检查一下protoc和protobuf的版本是否一致,并确保它们是兼容的。你可以在Anaconda Prompt中使用命令protoc --version
和pip show protobuf
来查看它们的版本。如果版本不一致,你可以尝试安装相同版本的protobuf来解决问题。如果版本一致但问题仍然存在,你可以尝试下面的解决方法。
引用[2]: 另一个可能的解决方法是在源文件中添加一行代码。你可以找到google/protobuf/internal/container.py
文件,并在其中添加以下代码:from collections.abc import MutableMapping
。这个代码的作用是导入MutableMapping
类,以解决AttributeError: module 'google.protobuf.internal.containers' has no attribute 'MutableMapping'
错误。
引用[3]: 这个错误可能是由于protobuf版本过低或者protobuf只支持Python 2.x导致的。你可以尝试使用pip install protobuf-py3
和pip install --upgrade protobuf
命令来安装或升级protobuf库。这样可以确保你使用的是适用于Python 3的protobuf版本。如果问题仍然存在,你可以尝试其他解决方法或者查找更多关于这个错误的信息来解决问题。
综上所述,你可以尝试检查和更新protobuf版本,或者在源文件中添加必要的代码来解决这个错误。
引用[.reference_title]
- 1 3 【ERROR】TypeError: expected bytes, Descriptor found[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
allinsert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - 2 问题解决 AttributeError: module ‘google.protobuf.internal.containers‘ has no attribute ...[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
allinsert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
相关推荐



















