No module named 'cv2' but it is installed
1)Delete all your existing opencv installation
2) Reinstall it again in that way (python 3)
python -m pip install opencv-python
3) And Voila!
> import cv2
> sift = cv2.xfeatures2d.SIFT_create()
No module named 'cv2' issue with opencv and contrib modules
Did you try to restart your code editor? I often need to close the file or whole VScoode and reopen for it to see the library I just installed.
Another problem could be that you're installing cv2 to a python verse that youre not using on your code editor..
If youre using python2.9 on your code editor but you install cv2 on your terminal with "pip3.10 install opencv-python" command, your code editor wont find it
No module named 'cv2.cv2'
try this:
Create Virtual Environment
conda create --name opencv-env python=3.6
Activate the environment
activate opencv-env
Install OpenCV and other important packages
pip install numpy scipy matplotlib scikit-learn jupyter
pip install opencv-contrib-python
pip install dlib
Test your installation
import cv2
cv2.__version__
Related Topics
How to Parse a Yaml File in Python
Django Multivaluedictkeyerror Error, How to Deal with It
How to Enable Cors on Django Rest Framework
How to Return Two Values from a Function in Python
Slice 2D Array into Smaller 2D Arrays
Pip Install from Pypi Works, But from Testpypi Fails (Cannot Find Requirements)
How to Change the X Axis in Matplotlib So There Is No White Space
Using an Numpy Array as Indices of the 2Nd Dim of Another Array
Creating an Empty Pandas Dataframe, Then Filling It
Order of Keys in Dictionaries in Old Versions of Python
How to Make Selenium Not Wait Till Full Page Load, Which Has a Slow Script
How to Process Sigterm Signal Gracefully
Matplotlib (Pyplot) Savefig Outputs Blank Image
Importing Orange Returns "Importerror: No Module Named Orange"
How to Cross Compile Python Interpreter for Windows Under Linux
How to Pass Another Entire Column as Argument to Pandas Fillna()
How to Remove the Ansi Escape Sequences from a String in Python