先把之前用上面命令安装的opencv删除,使用这条命令: pip uninstall opencv-python 然后用这条命令安装: pip install opencv-python-headless