Home > other >  Python No module named 'cv2'
Python No module named 'cv2'

Time:09-19

I am WIN10 system
In a recent project need
The import cv2
But the runtime error:
So Internet search solution, tried the following method:
PIP install python and opencv
Uninstall python - opencv
To PIP install python - opencv
And now the version information as shown in the figure below:

Will also be Lib \ site - packages \ cv2 directory file cv2 cp38 - win_amd64. Pyd copy under the Lib and rename as cv2. Py also copied to DLLS folder (not rename)
Confirm is the latest version. Python is closed to reopen after I run, but still hint No module named 'cv2, as shown in the first picture. Don't know how to solve the problem. Please know that the great god give directions.

CodePudding user response:

Use python3.6, 3.8 does have some problems in the use,
  • Related