First do run these commands inside Terminal/CMD:

conda update anaconda-navigator  
conda update navigator-updater  

Then the issue for the instruction below will be resolved

For windows if you have anaconda installed, you can simply do

pip install opencv-python

or

conda install -c https://conda.binstar.org/menpo opencv

if you are on linux you can do :

pip install opencv-python

or

conda install opencv 

Link1 Link2

For python3.5+ check these links : Link3 , Link4

Update:
if you use anaconda, you may simply use this as well (and hence don't need to add menpo channel):

conda install -c conda-forge opencv
Answer from Hossein on Stack Overflow
🌐
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
Discussions

Pip install works but I can't import "Fer and CV2"
Hello, I have PIP installed “fer” and “opencv-python” but I can’t import them. My commands to install are: pip install opencv-python pip install fer These worked. My python code is: import cv2 from fer import FE… More on discuss.python.org
🌐 discuss.python.org
7
0
August 26, 2023
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
Installed opencv but having trouble importing it
Now, when I type import cv2 in my .py file, I get the following error: ModuleNotFoundError: No module named 'cv2' I’m a beginner, so I really don’t know what is happening. Here are some things that can maybe help: where pip C:\Users\Lildu\anaconda3\Scripts\pip.exe where python ... More on discuss.python.org
🌐 discuss.python.org
3
0
April 7, 2024
How do I fix the issue moduleNotFoundError: No module named 'cv2' ?
it just seems that u are missing open cv all u need to do is install that it may be different depending on what u are using if u are using automatics repo, then it will probably be done from within the venv u can manually activate it from in cmd (cmd does not open in the folder by default so cd Your/StableDiffusion/path/here) by opening the activate.bat file found in stable-diffusion-webui (root) root\venv\Scripts\activate.batthen u will need to run pip install opencv-python else just install it from cmd with the same command pip install opencv-python More on reddit.com
🌐 r/StableDiffusion
8
1
October 16, 2022
🌐
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. In most cases, this error is caused by not having installed OpenCV in your current environment (i.e. the virtual environment in which you are working).
🌐
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 in an incorrect environment. To solve the error, install the module by running the pip install ...
🌐
Python.org
discuss.python.org › python help
Pip install works but I can't import "Fer and CV2" - Python Help - Discussions on Python.org
August 26, 2023 - Hello, I have PIP installed “fer” and “opencv-python” but I can’t import them. My commands to install are: pip install opencv-python pip install fer These worked. My python code is: import cv2 from fer import FER Both imports do not work. They both fail with a similar error: %Run testFer.py Traceback (most recent call last): File “N:\python\testFer.py”, line 1, in import cv2 ModuleNotFoundError: No module named ‘cv2’ Please help.
🌐
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 ·
Published   May 22, 2024
Author   chris17012
🌐
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.
Find elsewhere
🌐
Python.org
discuss.python.org › python help
Installed opencv but having trouble importing it - Python Help - Discussions on Python.org
April 7, 2024 - Now, when I type import cv2 in my .py file, I get the following error: ModuleNotFoundError: No module named 'cv2' I’m a beginner, so I really don’t know what is happening. Here are some things that can maybe help: where pip C:\Users\Lildu\anaconda3\Scripts\pip.exe where python ...
🌐
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.
🌐
Reddit
reddit.com › r/stablediffusion › how do i fix the issue modulenotfounderror: no module named 'cv2' ?
r/StableDiffusion on Reddit: How do I fix the issue moduleNotFoundError: No module named 'cv2' ?
October 16, 2022 -

Normally I would just look up the solution rather than ask but from what I've seen, most people tend to have this issue differently, hence why I needed to ask, but also because I'm completely ignorant on this matter. I don't think I could fix this on my own unless I found an answer that told me how step by step.

Anyway, as I was installing diffusions for the very first time, the cmd kept giving me this issue repeatedly.

Relauncher: Launching...

Traceback (most recent call last):

File "scripts/webui.py", line 18, in <module>

import cv2

ModuleNotFoundError: No module named 'cv2'

As I've said above, since I'm ignorant on this topic, I have no idea what that really means or how to fix it so any help would really be great. I really don't want several hours to be wasted on this lol

🌐
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…
🌐
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.
🌐
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
🌐
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 - When you receive the error “ImportError: No module named ‘cv2’”, it means that Jupyter Notebook cannot find the cv2 module. This error occurs because the cv2 module is not installed in your Jupyter Notebook environment.
🌐
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. To resolve this error, you need to run the pip install opencv-python command.
🌐
OpenCV
forum.opencv.org › python
No module named cv2 after installed the opencv-python - Python - OpenCV
April 1, 2025 - I create a new env and “pip install opencv-python” in this env but when i try to import cv2 i still get i google a lot for this problem win11 vscode try python=3.7,3.8.3.10,3.11 Any kind of help is appreciated!
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › python
Unable to import cv2 on OpenCV installation - Raspberry Pi Forums
mkdir myenv cd myenv python -m venv env source env/bin/activate pip install opencv-python In Thonny, click Run, Configure Interpreter, then for "Python Executable", click 3 dots and select Home myenv env bin python3.11 , click OK OK Now in Thonny repl (lower screen) we can import cv2 with no error: ... Sorry about the delay. I've been working hard on my end trying to figure out what the problem is. I have installed virtualenv but when I call ... /usr/bin/python: No module named venv So B.Goode, I did follow along with your steps exactly but it failed at the point indicated.
🌐
Core Electronics
forum.core-electronics.com.au › support
Python: import cv2 .. No module named 'cv2' - Support - Core Electronics Forum
January 11, 2026 - pip install opencv-python it says: Successfully installed numpy and opencv-python Good. I then run .py: import cv2 It says: No module named ‘cv2’ What am I doing wrong? :slight_smile:
🌐
GitHub
github.com › camelot-dev › camelot › issues › 286
No module named 'cv2' when importing camelot · Issue #286 · camelot-dev/camelot
March 1, 2022 - I installed camelot via pip and then went to import it and the import failed, giving the error ModuleNotfoundError: No module named 'cv2' I am on windows 10, python 3.10.2. I was able to do a pip i...
Author   scotscotmcc