@ModuleNotFoundError: No module named ‘cv2’
1、pip
pip install opencv-python
pip install opencv-python==x.x.x.xx
pip install opencv-python==4.0.1.23
2.conda
conda install opencv-python
conda install opencv #解决了我的问题
3.有时候遇到,你按照上述步骤安装了,运行代码依旧是ModuleNotFoundError: No module named ‘cv2’;而且在你安装的时候,提示已安装,这就很气人了!!!Requirement already satisfied: opencv-contrib-python in /home/sln/.local/lib/python3.5/site-packages (4.1.2.30)
Requirement already satisfied: numpy>=1.11.1 in /home/sln/.local/lib/python3.5/site-packages (from opencv-contrib-python) (1.14.0)