您可以使用pip安装cv2,在命令行中输入以下命令:pip install opencv-python如果您使用的是Anaconda,可以尝试使用以下命令:conda install -c conda-forge opencv