Stackoverflow/Python
ModuleNotFoundError: No module named 'cv2
The Neo
2020. 7. 23. 17:51
에러 내용
ModuleNotFoundError: No module named 'cv2.cv2'
단순히 cv2 모듈을 다시 설치하면 될 것으로 판단하여, pip install opencv-python을 시도해보았으나 이미 설치가 되어 있었다.
(base) E:\Project\universe\Real-Time-Face-Expression-Recognition-master>pip install opencv-python
Requirement already satisfied: opencv-python in c:\anaconda3\lib\site-packages (4.2.0.32)
Requirement already satisfied: numpy>=1.14.5 in c:\anaconda3\lib\site-packages (from opencv-python) (1.18.1)
해결 방안
(base) E:\Project\universe\Real-Time-Face-Expression-Recognition-master>pip uninstall opencv-python
Found existing installation: opencv-python 4.2.0.32
Uninstalling opencv-python-4.2.0.32:
Would remove:
c:\anaconda3\lib\site-packages\cv2\*
c:\anaconda3\lib\site-packages\opencv_python-4.2.0.32.dist-info\*
Proceed (y/n)? y
Successfully uninstalled opencv-python-4.2.0.32
(base) E:\Project\universe\Real-Time-Face-Expression-Recognition-master>pip install opencv-python
Collecting opencv-python
Downloading opencv_python-4.3.0.36-cp36-cp36m-win_amd64.whl (33.4 MB)
|████████████████████████████████| 33.4 MB 2.2 MB/s
Requirement already satisfied: numpy>=1.11.3 in c:\anaconda3\lib\site-packages (from opencv-python) (1.18.1)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.3.0.36
pip uninstall opencv-python
pip install opencv-python
반응형