this doesn't have anything to do with arduino but im trying to use visual studio code and get the opencv library to work but it says that cv2 is not recongnized
import cv2 as cv
img = cv.imread("Photos/cat.jpg")
cv.imshow('Cat' , img)
cv.waitKey(0)
J-M-L
June 17, 2022, 6:17pm
2
and you thought it would be appropriate to ask the question in a "Using Arduino" forum ??
even on a dedicated forum you'd be asked for waaaay more info..
like have you double checked the installation process? which python's version do you run? what's the error message? ...
➜ opencv-python · PyPI
Just install the library?
pip install opencv-python
ModuleNotFoundError: No module named 'cv2'
J-M-L
June 17, 2022, 6:21pm
7
I'd say start by reading in details the manual
Installation and Usage
If you have previous/other manually installed (= not installed via pip
) version of OpenCV installed (e.g. cv2 module in the root of Python's site-packages), remove it before installation to avoid conflicts.
Make sure that your pip
version is up-to-date (19.3 is the minimum supported version): pip install --upgrade pip
. Check version with pip -V
. For example Linux distributions ship usually with very old pip
versions which cause a lot of unexpected problems especially with the manylinux
format.
Select the correct package for your environment: There are four different packages (see options 1, 2, 3 and 4 below) and you should SELECT ONLY ONE OF THEM . Do not install multiple different packages in the same environment. 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.
...
it says that those commands are already satisfied for windows
Your other topic on the same subject deleted.
Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.
Repeated duplicate posting could result in a temporary or permanent ban from the forum.
Could you take a few moments to Learn How To Use The Forum
See also FAQ - Arduino Forum for general rules on forum behaviour and etiquette.
Hello,
Welcome to the Arduino Forum.
This guide explains how to get the best out of this forum. Please read and follow the instructions below.
Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is fru…
It will help you get the best out of the forum in the future.
Thank you.
system
Closed
December 14, 2022, 7:25pm
11
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.