Try

pip3 install opencv-python

to get the cv2. I'm not sure when opencv-python became available. I'd been building opencv by hand, but when I looked a few weeks ago, there it was. I'm using cv2 with Python3 in a VM that's running ubuntu/trusty64.

Answer from Dave W. Smith on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › modulenotfounderror-no-module-named-cv2-in-python
Modulenotfounderror: No Module Named 'CV2' in Python - GeeksforGeeks
July 23, 2025 - This error specifies that the Python interpreter cannot find the OpenCV module in the current environment. To resolve this issue we needs to install OpenCV library using pip command.
🌐
Roboflow
roboflow.com › use opencv › modulenotfounderror: no module named 'cv2'
ModuleNotFoundError: no module named 'cv2' (OpenCV)
The ModuleNotFoundError: no module named 'cv2' code indicates that your Python environment cannot find the OpenCV package.
Discussions

python - Cannot find module cv2 when using OpenCV - Stack Overflow
Copypi@raspberrypi~$ python cam.py Traceback (most recent call last) File "cam.py", line 1, in import cv2 ImportError: No module named cv2 · The file cv2.so is stored in /usr/local/lib/python2.7/site-packages/... There are also folders in /usr/local/lib called python3.2 and python2.6, ... More on stackoverflow.com
🌐 stackoverflow.com
Installed opencv but having trouble importing it
Hi all, I recently downloaded anaconda python in order to work on an opencv personal project. I installed opencv using pip install opencv-contrib-python, where it installed successfully. Now, when I type import cv2 in my .py file, I get the following error: ModuleNotFoundError: No module named ... More on discuss.python.org
🌐 discuss.python.org
3
0
April 7, 2024
Python: No module named 'cv2' when building OpenCV 4.5.5 from sources on fresh Ubuntu 20.04
$ pkg-config --modversion opencv4 4.5.5 $ python3 -c "import cv2; print(cv2.__version__)" Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'cv2' More on github.com
🌐 github.com
3
January 18, 2022
Issue "ModuleNotFoundError: No module named 'cv2'" although opencv is installed
There was an error while loading. Please reload this page More on github.com
🌐 github.com
15
May 22, 2024
🌐
Bobby Hadz
bobbyhadz.com › blog › python-no-module-named-cv2
ModuleNotFoundError: No module named 'cv2' in Python [Fixed] | bobbyhadz
April 8, 2024 - The Python ModuleNotFoundError: No module named 'cv2' occurs when we forget to install the `opencv-python` module before importing it or install it.
🌐
OpenCV Q&A Forum
answers.opencv.org › question › 228178 › opencv-python-no-module-named-cv2
OpenCV Python No module named 'cv2' - OpenCV Q&A Forum
March 28, 2025 - It does not have an explicit line install python-opencv, yet it has Python-related sections Step 3: Install Python Libraries: sudo apt -y install python3-dev python3-pip sudo -H pip3 install -U pip numpy sudo apt -y install python3-testresources cd $cwd # create virt envir python3 -m venv OpenCV-"$cvVersion"-py3 echo "# Virtual Environment Wrapper" >> ~/.bashrc echo "alias workoncv-$cvVersion=\"source $cwd/OpenCV-$cvVersion-py3/bin/activate\"" >> ~/.bashrc source "$cwd"/OpenCV-"$cvVersion"-py3/bin/activate
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
sudo python3 No module named 'cv2' - Raspberry Pi Forums
October 17, 2021 - ImportError: No module named 'cv2' i have been searching alot but with no luck. any help PLEASE! ... You probably installed the cv module locally (just for user pi). If you used pip / pip3 you have to install it globally with 'sudo' e.g. ... pi@raspberrypi:~ $ sudo pip3 install opencv-python ...
Find elsewhere
🌐
sebhastian
sebhastian.com › modulenotfounderror-no-module-named-cv2
How to fix ModuleNotFoundError: No module named 'cv2' in Python | sebhastian
May 26, 2023 - In summary, the ModuleNotFoundError: No module named 'cv2' occurs when the opencv-python library is not installed in your Python environment.
🌐
Python.org
discuss.python.org › python help
Installed opencv but having trouble importing it - Python Help - Discussions on Python.org
April 7, 2024 - Hi all, I recently downloaded anaconda python in order to work on an opencv personal project. I installed opencv using pip install opencv-contrib-python, where it installed successfully. Now, when I type import cv2 in my .py file, I get the following error: ModuleNotFoundError: No module named ...
🌐
Saturn Cloud
saturncloud.io › blog › how-to-fix-importerror-no-module-named-cv2-in-jupyter
How to Fix ImportError: No module named 'cv2' in Jupyter? | Saturn Cloud Blog
November 18, 2023 - The cv2 library provides many functions ... the error “ImportError: No module named ‘cv2’”, it means that Jupyter Notebook cannot find the cv2 module....
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
ModuleNotFoundError: No module named 'cv2'ModuleNotFoundError: No module named 'cv2' - Raspberry Pi Forums
February 13, 2024 - The experience you are finding seems to imply the package location is not being pointed to when running outside of MU. ... Are you managing MAIN.PY inside a Virtual Environment as MU seems to recommend? If so, you have to activate the VENV before you can run MAIN.PY with just PYTHON.
🌐
GitHub
github.com › opencv › opencv › issues › 21471
Python: No module named 'cv2' when building OpenCV 4.5.5 from sources on fresh Ubuntu 20.04 · Issue #21471 · opencv/opencv
January 18, 2022 - After successfully install OpenCV 4.5.5 from sources, the Python3 bindings is broken: $ pkg-config --modversion opencv4 4.5.5 $ python3 -c "import cv2; print(cv2.__version__)" Traceback (most recent call last): File " ", line 1, i...
Author   opencv
🌐
PyiHub
pyihub.org › home › no module named cv2 modulenotfounderror in python
No module named cv2 ModuleNotFoundError in Python
April 3, 2024 - If you already have installed OpenCV but still getting ModuleNotFoundError: No module named cv2 error when trying to import the module, then you need to uninstall the installed version and then again install the OpenCV module.
🌐
Data Science Learner
datasciencelearner.com › importerror-no-module-named-cv2-fix
Importerror No Module Named cv2 : How to Fix ? - Data Science Learner
October 2, 2023 - The straight-way fix for this error (no module named cv2) is to reinstall this module (OpenCV-python).
🌐
JanBask Training
janbasktraining.com › community › python-python › modulenotfounderror-no-module-named-cv21
ModuleNotFoundError No Module Named Cv2 | JanBask Training Community
November 16, 2022 - The "Module Not Found" error, specifically "No Module Named Cv2," typically occurs when trying to import the OpenCV library (cv2) in Python code without it being installed in the current environment.
🌐
GitHub
github.com › carla-simulator › carla › issues › 7683
Issue "ModuleNotFoundError: No module named 'cv2'" although opencv is installed · Issue #7683 · carla-simulator/carla
May 22, 2024 - Issue "ModuleNotFoundError: No module named 'cv2'" although opencv is installed#7683 · Copy link · Assignees · chris17012 · opened · on May 22, 2024 · Issue body actions · No description provided. Reactions are currently unavailable · PabloVD · No labels ·
Author   carla-simulator
🌐
NVIDIA Developer Forums
forums.developer.nvidia.com › robotics & edge computing › jetson systems › jetson nano
Import error.Module not found error cv2.No module named cv2.Cant install open cv - Jetson Nano - NVIDIA Developer Forums
August 8, 2023 - Hello.I cant install open-cv in python 3.6.I need to import cv2, but i have module not found error: no module named cv2.Sudo apt-get install python-opencv and sudo apt-get install python3-opencv didnt help. pip install…
🌐
PyPI
pypi.org › project › opencv-python
opencv-python · PyPI
There is no plugin architecture: all the packages use the same namespace (cv2). If you installed multiple different packages in the same environment, uninstall them all with pip uninstall and reinstall only one package. a. Packages for standard ...
      » pip install opencv-python
    
Published   Feb 05, 2026
Version   4.13.0.92
🌐
OpenCV Q&A Forum
answers.opencv.org › question › 223436 › no-module-named-cv2
No module named 'cv2' - OpenCV Q&A Forum
I wanted to add this as a comment but didn't see any option to do so on Safari mobile (i'm now using the desktop browser) ... Did you check your environment variable? does your program gets the python location? If using pip list gives you opencv-python package name then the program may not be able to find your python folder location.
🌐
Reddit
reddit.com › r/learnpython › modulenotfounderror: no module named 'cv2'
r/learnpython on Reddit: ModuleNotFoundError: No module named 'cv2'
May 25, 2022 -

Hi, I really need help. I've been crying about why it's not working for 2 hours. I know this error is very famous and common for python, but I can't fix this at all.

So, I was trying a few hand-tracking codes, with the code "import cv2" but all of the codes ended up saying ModuleNotFoundError: No module named 'cv2'.

I have done installing these codes already,

- pip3 install OpenCV-python

- pip3 install OpenCV-contrib-python

I'm using Python(Python3) 3.10(64bit), Spyder as software, Conda 4.12.0

I am quite new to python, so I may ask lots of basic questions. please help me.