获取TypeError:“描述符无法直接安装”运行MediaPipe时
我正在尝试使用MediaPipe运行一个脚本,但是我遇到了此错误:TypeError:“不能直接安装描述符”,
如果此调用来自_pb2.py文件,您生成的代码已过时,必须使用Protoc&gt重新生成; = 3.19.0。
如果您无法立即再生纯种,那么其他一些可能的解决方法是:
- 将Protobuf软件包降级到3.20.x或更低。
- set protocol_buffers_python_implementation = python(但这将使用纯Python解析,并且会慢得多)。
我目前的Python版本是3.7
I am trying to run a script using mediapipe but I am getting this error: TypeError:"Descriptors cannot be installed 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:
- Downgrade the protobuf package to 3.20.x or lower.
- Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
My Current Version of python is 3.7
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
至少目前,解决方案正在错误消息中:
因此
The solution, at least for now, is in the error message:
So add a pinned requirement to protobuf in your requirements.txt: