问题: pb2.text_format.Merge(f.read(), self.solver_param) AttributeError: 'module' object has no attribute 'text_format'
解决办法:pip install protobuf==2.6.0
分析: 使用命令进行安装的时候,版本没有达到工程所需的,所以需要升级
本文解决了一个关于使用protobuf库时出现的AttributeError问题,通过指定安装protobuf的2.6.0版本来确保代码正常运行。
问题: pb2.text_format.Merge(f.read(), self.solver_param) AttributeError: 'module' object has no attribute 'text_format'
解决办法:pip install protobuf==2.6.0
分析: 使用命令进行安装的时候,版本没有达到工程所需的,所以需要升级
3万+

被折叠的 条评论
为什么被折叠?