解决方法: pip uninstall opencv-python pip install opencv-python-headless export QT_QPA_PLATFORM=offscreen