欢迎光临散文网 会员登陆 & 注册

深度精神网络学习protobuf降级报错的两种解决方法

2023-03-20 23:11 作者:Pasta_OldRuns  | 我要投稿

错误: 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). 两种解决方法这里只给正面解决的一种

把protobuf降级到你需要的版本号

pip install protobuf==型号 如3.20.*

与onnx异曲同工

比较简单不再赘述

深度精神网络学习protobuf降级报错的两种解决方法的评论 (共 条)

分享到微博请遵守国家法律