解决报错cannot import name ‘_registerMatType‘ from ‘cv2.cv2‘
使用yolox时系统运行报这个错误
Traceback (most recent call last):
File "tools/train.py", line 13, in <module>
from yolox.core import Trainer, launch
File "/user-data/YOLOX-main/yolox/__init__.py", line 4, in <module>
from .utils import configure_module
File "/user-data/YOLOX-main/yolox/utils/__init__.py", line 15, in <module>
from .setup_env import *
File "/user-data/YOLOX-main/yolox/utils/setup_env.py", line 9, in <module>
import cv2
File "/opt/conda/lib/python3.8/site-packages/cv2/__init__.py", line 9, in <module>
from .cv2 import _registerMatType
ImportError: cannot import name '_registerMatType' from 'cv2.cv2' (/opt/conda/lib/python3.8/site-packages/cv2/cv2.cpython-38-x86_64-linux-gnu.so)