启动时protobuf 报错
TaChao opened this issue · 1 comments
TaChao commented
bug描述
启动时protobuf 报错, 是否考虑升级protobuf 或者在pip包中指定protobuf版本
截屏
# eiseg
Traceback (most recent call last):
File "/Users/tachao/miniconda3/bin/eiseg", line 5, in <module>
from eiseg.run import main
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/eiseg/run.py", line 25, in <module>
from app import APP_EISeg # 导入带槽的界面
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/eiseg/app.py", line 34, in <module>
from controller import InteractiveController
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/eiseg/controller.py", line 23, in <module>
import paddle
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/__init__.py", line 25, in <module>
from .framework import monkey_patch_variable
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/framework/__init__.py", line 17, in <module>
from . import random # noqa: F401
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/framework/random.py", line 16, in <module>
import paddle.fluid as fluid
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/fluid/__init__.py", line 36, in <module>
from . import framework
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/fluid/framework.py", line 35, in <module>
from .proto import framework_pb2
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/fluid/proto/framework_pb2.py", line 33, in <module>
_descriptor.EnumValueDescriptor(
File "/Users/tachao/miniconda3/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 755, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
运行环境(请尽量填写,这可以帮助我们定位问题):
- 系统: [Mac os/Linux]
- 安装方式:[pip]
- 软件版本:[0.5.0]
geoyee commented
试试升级protobuf看呢,我看了下我的环境中protobuf是3.20.0的,可以启动