OpenCV install on Python 3.6: ModuleNotFoundError - python

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

Related

No module named cv cv2 No matching distribution found for mediapipe

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

ImportError: DLL load failed while importing cv2: The specified module could not be found in pycharm with python 3.9

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

No module named 'cv2' during importing in python

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

Not able to install skbuild

I am trying to install "CMake" with command
pip3 install CMake.
Its gives an error for a module "skbuild"
from skbuild import setup, ModuleNotFoundError: No module named 'skbuild'
But but when tried to install skbuild with command
pip3 install skbuild
it gives error
"Could not find a version that satisfies the requirement skbuild (from versions: ) No matching distribution found for skbuild".
I am not able to solve this error. Please help. I trying the implementation it on Window 10. Using Python 3.7.0. I tried couple of versions of pip3 (10.0.1, 9.0.3, 9.0.2, 9.0.1). Nothing is working.
Try pip install scikit-build. For me, pip install cmake works properly afterwards.
this worked for me while installation of this github repo https://github.com/ultralytics/yolov3
# For pip
pip install scikit-build
# For pip3
pip3 install scikit-build
There are pre-compiled binaries available on THIS page for Windows as MSI packages and ZIP files. You can find the one for the OS you are using.
If you want to proceed with your current approach then can you can probably refer THIS LINK

from PIL import Image failed on Python3.6

I'm new to Python and I have a problem with Pillow (as many people before me).
Running the command below:
from PIL import Image
causes a known error:
ModuleNotFoundError: No module named 'PIL'
The problem occurs when I try to run it with Python 3.6, everything works fine with Python 3 however I have to use version 3.6 in my project.
Pillow version: 4.3.0, so it is compatible with this Python version.
Why does this not work on the newer version?
I had to install pillow for 3.6 python: python3.6 -m pip install pillow
PIL and Python compatibility issue. See for example (http://pillow.readthedocs.io/en/5.1.x/installation.html ).
pipX search Pillow -> shows which version is installed and available.
Better to use Python virtual environment to avoid compatibility issues.
pip uninstall Pillow
pip uninstall PIL
pip install Pillow
Source
C:\python>pip install pillow
Collecting pillow
Downloading https://files.pythonhosted.org/packages/4e/d9/468422371e6fcf02d6a162ee30db4552221de8b2b3ff837363bf54cbb347/Pillow-6.1.0-cp36-cp36m-win_amd64.whl (2.0MB)
100% |████████████████████████████████| 2.0MB 3.2MB/s
Installing collected packages: pillow
Successfully installed pillow-6.1.0
You are using pip version 18.1, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Categories

Resources