I followed the instructions to install opencv in ubuntu from the link https://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/#disqus_thread.
The module is installed properly. But when I import it in python I get the error "No module named 'cv2'"
What can I do?
If you are using Python3:
pip3 install opencv-python
To install the latest stable version of opencv-python 4.1.2.30 with pip, use the below command:
pip install opencv-python
Related
I am using windows
import cv2
ModuleNotFoundError: No module named 'cv2'
how to fix it?
I tried
pip install opencv-contrib-python
pip3 install opencv-python
pip install opencv-python
etc etc, still did not work
update: cv2 is fixed, but I am having a problem on mediapipe.
it's showing like this:
ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none)
ERROR: No matching distribution found for mediapipe
WARNING: You are using pip version 21.3.1; however, version 22.3.1 is available.
You should consider upgrading via the 'E:\python\Scripts\python.exe -m pip install --upgrade pip' command.
my python version is 3.11.0
It seems the install of cv2 goes nicer with system install: apt install python3-opencv
I think, with Python 3.11.0 we can't install mediapipe. What I suggest you is to try lowering your Python version to 3.7.0 and install mediapipe. If you face the same issue then try installing mediapipe==0.8.9
I am getting the error 'ModuleNotFoundError: No module named 'win32gui''. Please brief me the instructions on how can I resolve this issue on my anaconda on mac.
You must install it from the version hosted on the pip package manager. You can do this with the following command:
pip install win32gui
I have already installed opencv-python library but when i import it into the the compiler it does not work. I have also tried to install it using pip install opencv-python but it says Requirement already satisfied:. Which means that library is installed but still not works. I am using pycharm community edition and python 3.9.
try to install this
pip install opencv-python-headless
when I import syft in Python3.7, it says: ModuleNotFoundError: No module named 'google.protobuf.reflection'.
when I import TensorFlow, it says: ImportError: cannot import name 'descriptor' from 'google.protobuf' (unknown location).
How to solve these two problems?
The related software information are:
Mac OSX
Python3.7.3
protoc version is 3.8.0
pip3 is located in:/Users/susan/anaconda3/bin/pip3
Uninstall google and protobuf and install them again
pip uninstall protobuf
pip uninstall google
pip install google
pip install --upgrade protobuf
The most important thing is that you should use the latest stable version of protobuf.
I am getting the following error when using import cv2:
ModuleNotFoundError: No module named 'cv2'
My version of Python is 3.6 64 bit. I have downloaded the whl file to install it via pip manually, and have also installed it with pip install opencv-python however I still get ModuleNotFoundError.
pip outputs Requirement already satisfied: opencv-python in c:\...\python36\site-packages
Help would be much appreciated.
Your download must have been corrupted. It happened to me too. Simply uninstall the package and use
sudo apt-get install python open-cv
Use pip install -U opencv-python