Thanks a ton! This is the simplest way I have found online to get my OpenCV working. Regarding to the last part, press any key to exit, you'd have to keep image widow on focus to terminate the program.
Thank you! I am very stupid in programming, so it took me a few days to install opencv. Thanks for the working version of the installation. Hope I can create a program.
In VIM (the text editor I use in the video), you can save a file by pressing ESC after which you write :wq and press ENTER. A much simpler alternative to VIM is to use Visual Studio Code.
Why does my appearance when I type "vim opencv_demo.py" doesn't look like it appears on your terminal screen? sorry I'm keep asking, I hope I can learn from you, Sir🙏🏻
I did every step but when i do python opencv_@t the output doesnt show?? It say Traceback (most recent call last): File "opencv_demo.py", line 1, in import cv2 ModuleNotFoundError: No module named 'cv2' help me. thanks
This error usually means that Python can't find the OpenCV module/library. Double check that you have activated the environment in which you've installed OpenCV and that you are using this environment.
Amazing video But i have a little problem and would be very thankful for the help, I followed the setup steps and was able to display images successfully Now i want to use jupyter lab in the virtual environment So i used the command jupyter-lab in the environment to open jupyter notebook After that i ran a simple program but it is showing that "No module named OpenCV" How can i rectify this problem? I am running it in the jupyter lab terminal by going to the position of the notebook through cd
My guess is that jupyter-lab is not installed in the same environment as OpenCV, this is why you get the "No module named OpenCV". When using OpenCV from Jupyter, you'll also want to be careful how you use the OpenCV GUI functions. I'll do some digging and maybe write/record a tutorial about using OpenCV with jupyter-lab.
Thank you for the video, I followed the steps but got the following error "This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem." any help is appreciated. I am running python 3.7 on macOS Catalina, I have installed Qt5 but did not help. thanks
I've installed Python 3 and OpenCV without any Qt5 requirement on my Mac but I've used the Python installer from python.org (as mentioned in the video).
...any idea how to configure eclipse (macOS) to use openCV... my python OpenCV program runs (using the virtual env as per the video) but not via Eclipse... any help appreciated
I don't use Eclipse for Python development, so I can't give you an exact answer. I suspect that you need to direct/setup Eclipse to use the Python interpreter from the virtual environment in which you've installed python-opencv (try some queries about Eclipse and Python virtual environments).
@@sdevane75 No promises, but I will look into using Eclipse with Python this weekend. (You can subscribe to my channel if you want to be notified about new Python videos.)
Hi Stephen, I've tried Eclipse with PyDev on a Windows machine (this is what I have available for now) and it worked for the same OpenCV program I show in the macOS video. Do you think you can manage to follow the steps if I record a video on Windows ? The setup should be the same except that you will need to adapt it a bit like for example using your macOS home folder instead of the Windows Users folder and similar.
I did every step but when i do python opencv_demo.py the output doesnt show ?? when i open it in visual studio it says import cv2 is "unresolved import"
You need to "tell" Visual Studio Code what Python interpreter and virtualenv to use, otherwise it will use the default Python from Mac which is not what you want. Another approach is start Visual Studio Code from Terminal after you've activated the environment in which you've installed OpenCV.
pip install pencv-phython doesn't work for me=, I get "ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none) ERROR: No matching distribution found for opencv-python" -0 any ideas?
My guess is that you are using Python 3.8 which at this time breaks SciPy, OpenCV and a few other libraries. Try with Python 3.7 like I did in the video and it should work.
Thanks for the video it was really informative, I got the following error. Any suggestion please? ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects [notice] A new release of pip available: 22.3.1 -> 23.1.2 [notice] To update, run: pip install --upgrade pip [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.
UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment: Specifications: - opencv -> python[version='>=2.7,=3.5,=3.6,=3.7,
I did every step but when i do python opencv_@t the output doesnt show?? It say Traceback (most recent call last): Traceback (most recent call last): File "opencv_demo.py", line 6, in img = cv2.imreal("mountain.png") AttributeError: module 'cv2.cv2' has no attribute 'imreal Help me please
this is the best and clearest video i've watched on this
Thank you. This is the only guide that I have watched on RUclips or read online that works. I am very grateful. :-)
what to do at 2:42 ??
what key should i use to quit ?
Thanks a ton! This is the simplest way I have found online to get my OpenCV working. Regarding to the last part, press any key to exit, you'd have to keep image widow on focus to terminate the program.
what to do at 2:42 ??
what key should i use to quit ?
really very helpful video :) . seriously I'm stuck on apple silicon but this method work in apple silicon :). I'm very happy
Thank you! I am very stupid in programming, so it took me a few days to install opencv. Thanks for the working version of the installation. Hope I can create a program.
Very helpful in both vim editor and opencv. I really appreciate it.
what to do at 2:42 ??
what key should i use to quit ?
Works!!! Macbook 2020 catalina
python 3.85
how did you save the program? I couldn't tell what you typed in the last line at 2:43
In VIM (the text editor I use in the video), you can save a file by pressing ESC after which you write :wq and press ENTER.
A much simpler alternative to VIM is to use Visual Studio Code.
@@AtoZProgrammingTutorials Thank you so much
Thanks for your video!! It's help me install Opencv3 & Python3.7 successfully.
thank you you're the best! simple and to the point
sorry, Sir. i want to ask you, after you write the command at line 13 (at minute 2:43) you say "save the program", how? i dont understand..
what suppose to do to save the program? command+s or any else? thank you
Why does my appearance when I type "vim opencv_demo.py" doesn't look like it appears on your terminal screen? sorry I'm keep asking, I hope I can learn from you, Sir🙏🏻
In vim, for saving a file, you need to press ESC, than write :wq
I suggest to watch/read a vim introduction tutorial.
vim looks different on your Mac because the default vim configuration is to not show colored text and line numbers.
AtoZ Programming Tutorials okay Sir, i will try it thank you🙏🏻
Perfect! Thank you!
I did every step but when i do python opencv_@t the output doesnt show?? It say Traceback (most recent call last):
File "opencv_demo.py", line 1, in
import cv2
ModuleNotFoundError: No module named 'cv2'
help me. thanks
This error usually means that Python can't find the OpenCV module/library. Double check that you have activated the environment in which you've installed OpenCV and that you are using this environment.
@@AtoZProgrammingTutorials how can i double check, i dont understand , please show me step by step , tks u so much
what to do at 2:42 ??
what key should i use to quit ?
Doesn't matter which, any key from your keyboard (but you need to click on one of the two windows first).
Amazing video
But i have a little problem and would be very thankful for the help,
I followed the setup steps and was able to display images successfully
Now i want to use jupyter lab in the virtual environment
So i used the command jupyter-lab in the environment to open jupyter notebook
After that i ran a simple program but it is showing that "No module named OpenCV"
How can i rectify this problem?
I am running it in the jupyter lab terminal by going to the position of the notebook through cd
My guess is that jupyter-lab is not installed in the same environment as OpenCV, this is why you get the "No module named OpenCV". When using OpenCV from Jupyter, you'll also want to be careful how you use the OpenCV GUI functions. I'll do some digging and maybe write/record a tutorial about using OpenCV with jupyter-lab.
Thanks a lot that will be really helpful
Amazing video
It helped me alot
@@AtoZProgrammingTutorials Yes that will be really helpful thanks
Thank you for the video, I followed the steps but got the following error "This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem." any help is appreciated. I am running python 3.7 on macOS Catalina, I have installed Qt5 but did not help. thanks
I've installed Python 3 and OpenCV without any Qt5 requirement on my Mac but I've used the Python installer from python.org (as mentioned in the video).
Hi Mohammad, I had the same problem but found if I installed 'opencv-python-headless' with pip instead of 'opencv-python' it worked fine.
Use the next pip command to install OpenCV 4.1 which doesn't require Qt:
pip install opencv-python==4.1.2.30
@@davidbottrill5724 Your solution works only if you don't need the GUI functionality of OpenCV.
Hey Man...Iam too getting the same error regarding qt ....Is it resolved ...Can u Please help me with it??
what terminal are you using? I try with the default mac terminal (the black one) and it doesn't work
I'm using the default Terminal application from macOS.
Thank you for a very good guide :)
I can not save the code in the python virtual environment. I dont know why
thank you. This tutorial is really helpful.
Thank you. It really helped out.
...any idea how to configure eclipse (macOS) to use openCV... my python OpenCV program runs (using the virtual env as per the video) but not via Eclipse... any help appreciated
I don't use Eclipse for Python development, so I can't give you an exact answer. I suspect that you need to direct/setup Eclipse to use the Python interpreter from the virtual environment in which you've installed python-opencv (try some queries about Eclipse and Python virtual environments).
@@AtoZProgrammingTutorials rhabdomyolysis. Tried all that before I posted but couldn't find the answer. Thanks for response.
@@sdevane75 No promises, but I will look into using Eclipse with Python this weekend. (You can subscribe to my channel if you want to be notified about new Python videos.)
Hi Stephen,
I've tried Eclipse with PyDev on a Windows machine (this is what I have available for now) and it worked for the same OpenCV program I show in the macOS video.
Do you think you can manage to follow the steps if I record a video on Windows ? The setup should be the same except that you will need to adapt it a bit like for example using your macOS home folder instead of the Windows Users folder and similar.
@@AtoZProgrammingTutorials yes please
it really helped me 🥰❤️
I did every step but when i do python opencv_demo.py the output doesnt show ?? when i open it in visual studio it says import cv2 is "unresolved import"
You need to "tell" Visual Studio Code what Python interpreter and virtualenv to use, otherwise it will use the default Python from Mac which is not what you want. Another approach is start Visual Studio Code from Terminal after you've activated the environment in which you've installed OpenCV.
let's say i have installed like you did. can i use openCV now from PyCharm ?
Thanks for this mate!!!
Yes you can, you just need to setup PyCharm to use the virtual environment in which you've installed OpenCV for Python.
AtoZ Programming Tutorials I’m gonna do this and let you know! Big thanks!
you are the best.
grazie !
pip install pencv-phython doesn't work for me=, I get "ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none) ERROR: No matching distribution found for opencv-python" -0 any ideas?
My guess is that you are using Python 3.8 which at this time breaks SciPy, OpenCV and a few other libraries. Try with Python 3.7 like I did in the video and it should work.
@@AtoZProgrammingTutorials excellent - that worked. thanks for rapid response
Thanks for the video it was really informative, I got the following error. Any suggestion please?
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
thank you ıt's perfectly run
why cant i use opencv in pycharm built in ide
Sure you can, but you need to setup PyCharm to use the virtual environment in which you've installed OpenCV.
@@AtoZProgrammingTutorials can you describe how?
@@krishbinpaudel2765 Sorry, I don't use PyCharm, try to search after "using PyCharm with virtual environments". You'll probably find something.
thanks
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- opencv -> python[version='>=2.7,=3.5,=3.6,=3.7,
Sorry, no idea. I didn't used Anaconda or Miniconda, I've used the Python installer for macOS from python.org.
I'm getting like : no such as job
when image window is getting open i am not able to close and jupyter kernel is crashing as well.
I did every step but when i do python opencv_@t the output doesnt show?? It say Traceback (most recent call last):
Traceback (most recent call last):
File "opencv_demo.py", line 6, in
img = cv2.imreal("mountain.png")
AttributeError: module 'cv2.cv2' has no attribute 'imreal
Help me please
You seem to have a typo, it should be cv2.imread and not cv2.imreal!
@@AtoZProgrammingTutorials lol