云端训练YOLOv5模型时报错

云端训练YOLOv5模型时报错
反馈如下:
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).

你这个是tensorboard的问题是protobuf版本有点高了, 可能你别的地方安装的有问题, 我刚刚遇到的,直接:

pip3 install --force-reinstall protobuf==3.19.0

应该就可以了

可以使用pytorch官网链接现在用的服务器有配置好的yolo环境