protobuf报错
Posted hozhangel
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了protobuf报错相关的知识,希望对你有一定的参考价值。
>>> import tensorflow as tf Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 24, in <module> from tensorflow.python import * File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 52, in <module> from tensorflow.core.framework.graph_pb2 import * File "/usr/local/lib/python3.5/dist-packages/tensorflow/core/framework/graph_pb2.py", line 6, in <module> from google.protobuf import descriptor as _descriptor ImportError: No module named ‘google.protobuf‘
试了很多方法 差点卸载tensorflow重装了
最后卸载protobuf
pip uninstall protobuf
可以执行多次 直到把所有版本protobuf全部卸载
然后再次安装protobuf
pip install protobuf
然后遇到了新问题:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘/usr/local/lib/python3.5/dist-packages/protobuf-3.6.0-py3.5-nspkg.pth‘
Consider using the `--user` option or check the permissions.
执行:
pip install -- user protobuf
以上是关于protobuf报错的主要内容,如果未能解决你的问题,请参考以下文章
Mac M1上 Android开发使用protobuf报错处理
Ubuntu编译Protobuf(Base tensorflow-12)报错
Cocos Creator 加载使用protobuf第三方库,因为加载顺序报错
错误记录Flutter 混合开发获取 BinaryMessenger 报错 ( FlutterActivityAndFragmentDelegate.getFlutterEngine() )(代码片段
springcloud报错-------关于 hystrix 的异常 FallbackDefinitionException:fallback method wasn't found(代码片段
错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )(代码片段