报错信息
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.1.0If 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_BUPFERS_PYTHON_iMPLEMENTATION=python (but this will use pure-Python parsing and will be mch slower ,More information: https://developers. google.com/protocol-buffers/docs/news/2022-05-06#python-updates
(paddle) F: \pycharm\PyCharm Community Edition 2022.1.4\bin\PaddleOCR-release-2.6\PPOCRLabe1>-
问题就是protohuf版本不兼容,降低其版本到3.20.x以下
运行
pip uninstall protohuf
pip install protohuf == 3.19.0 --user
重启软件再次运行即可