Install OpenCV for Python on macOS Catalina

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 85

  • @adamay8896
    @adamay8896 4 года назад +5

    this is the best and clearest video i've watched on this

  • @middlegrey2
    @middlegrey2 4 года назад +4

    Thank you. This is the only guide that I have watched on RUclips or read online that works. I am very grateful. :-)

    • @ashutoshpandey7006
      @ashutoshpandey7006 2 года назад

      what to do at 2:42 ??
      what key should i use to quit ?

  • @MrJettank
    @MrJettank 4 года назад +2

    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.

    • @ashutoshpandey7006
      @ashutoshpandey7006 2 года назад

      what to do at 2:42 ??
      what key should i use to quit ?

  • @kunalsoni7681
    @kunalsoni7681 3 года назад +1

    really very helpful video :) . seriously I'm stuck on apple silicon but this method work in apple silicon :). I'm very happy

  • @irinazhenyakova9223
    @irinazhenyakova9223 4 года назад +1

    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.

  • @solomonalvinsamuelmgunda7752
    @solomonalvinsamuelmgunda7752 3 года назад +1

    Very helpful in both vim editor and opencv. I really appreciate it.

    • @ashutoshpandey7006
      @ashutoshpandey7006 2 года назад

      what to do at 2:42 ??
      what key should i use to quit ?

  • @lucidwavs4004
    @lucidwavs4004 3 года назад +1

    Works!!! Macbook 2020 catalina

  • @caylareign
    @caylareign 4 года назад +1

    how did you save the program? I couldn't tell what you typed in the last line at 2:43

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад

      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.

    • @caylareign
      @caylareign 4 года назад

      @@AtoZProgrammingTutorials Thank you so much

  • @Doraemomkyle
    @Doraemomkyle 5 лет назад +1

    Thanks for your video!! It's help me install Opencv3 & Python3.7 successfully.

  • @yamansahfi4009
    @yamansahfi4009 4 года назад +1

    thank you you're the best! simple and to the point

  • @liyanafaiza5511
    @liyanafaiza5511 4 года назад

    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..

    • @liyanafaiza5511
      @liyanafaiza5511 4 года назад

      what suppose to do to save the program? command+s or any else? thank you

    • @liyanafaiza5511
      @liyanafaiza5511 4 года назад

      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🙏🏻

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад +1

      In vim, for saving a file, you need to press ESC, than write :wq
      I suggest to watch/read a vim introduction tutorial.

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад

      vim looks different on your Mac because the default vim configuration is to not show colored text and line numbers.

    • @liyanafaiza5511
      @liyanafaiza5511 4 года назад

      AtoZ Programming Tutorials okay Sir, i will try it thank you🙏🏻

  • @love_sinan
    @love_sinan Год назад

    Perfect! Thank you!

  • @lequangphuong5273
    @lequangphuong5273 4 года назад +1

    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

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад +1

      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.

    • @lequangphuong5273
      @lequangphuong5273 4 года назад

      @@AtoZProgrammingTutorials how can i double check, i dont understand , please show me step by step , tks u so much

  • @ashutoshpandey7006
    @ashutoshpandey7006 2 года назад

    what to do at 2:42 ??
    what key should i use to quit ?

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  2 года назад

      Doesn't matter which, any key from your keyboard (but you need to click on one of the two windows first).

  • @arundogra8233
    @arundogra8233 4 года назад +2

    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

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад

      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.

    • @ayandogra6568
      @ayandogra6568 4 года назад

      Thanks a lot that will be really helpful
      Amazing video
      It helped me alot

    • @arundogra8233
      @arundogra8233 4 года назад

      @@AtoZProgrammingTutorials Yes that will be really helpful thanks

  • @mkhkheder
    @mkhkheder 4 года назад +2

    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

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад +1

      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).

    • @davidbottrill5724
      @davidbottrill5724 4 года назад

      Hi Mohammad, I had the same problem but found if I installed 'opencv-python-headless' with pip instead of 'opencv-python' it worked fine.

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад +2

      Use the next pip command to install OpenCV 4.1 which doesn't require Qt:
      pip install opencv-python==4.1.2.30

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад +1

      @@davidbottrill5724 Your solution works only if you don't need the GUI functionality of OpenCV.

    • @gauravreddy3732
      @gauravreddy3732 4 года назад

      Hey Man...Iam too getting the same error regarding qt ....Is it resolved ...Can u Please help me with it??

  • @federicoundurragaalamos9093
    @federicoundurragaalamos9093 5 лет назад

    what terminal are you using? I try with the default mac terminal (the black one) and it doesn't work

  • @alexlindgren1
    @alexlindgren1 4 года назад

    Thank you for a very good guide :)

  • @eagansymonds
    @eagansymonds 2 года назад

    I can not save the code in the python virtual environment. I dont know why

  • @nhatvule6705
    @nhatvule6705 4 года назад

    thank you. This tutorial is really helpful.

  • @arjun_sanjeev
    @arjun_sanjeev 4 года назад

    Thank you. It really helped out.

  • @sdevane75
    @sdevane75 5 лет назад

    ...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

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  5 лет назад +1

      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
      @sdevane75 5 лет назад

      @@AtoZProgrammingTutorials rhabdomyolysis. Tried all that before I posted but couldn't find the answer. Thanks for response.

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  5 лет назад

      @@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.)

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  5 лет назад

      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.

    • @sdevane75
      @sdevane75 5 лет назад

      @@AtoZProgrammingTutorials yes please

  • @GSK-Tech
    @GSK-Tech 3 года назад

    it really helped me 🥰❤️

  • @ajwadmajed3551
    @ajwadmajed3551 4 года назад

    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"

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад

      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.

  • @ferooyahya4138
    @ferooyahya4138 4 года назад

    let's say i have installed like you did. can i use openCV now from PyCharm ?
    Thanks for this mate!!!

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад +1

      Yes you can, you just need to setup PyCharm to use the virtual environment in which you've installed OpenCV for Python.

    • @ferooyahya4138
      @ferooyahya4138 4 года назад

      AtoZ Programming Tutorials I’m gonna do this and let you know! Big thanks!

  • @md.soleymankhan8567
    @md.soleymankhan8567 4 года назад

    you are the best.

  • @danielecampagnano1094
    @danielecampagnano1094 10 месяцев назад

    grazie !

  • @sdevane75
    @sdevane75 5 лет назад

    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?

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  5 лет назад +1

      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.

    • @sdevane75
      @sdevane75 5 лет назад +1

      @@AtoZProgrammingTutorials excellent - that worked. thanks for rapid response

  • @mauricioherrera107
    @mauricioherrera107 Год назад

    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.

  • @s.n.n.c.
    @s.n.n.c. 5 лет назад

    thank you ıt's perfectly run

  • @krishbinpaudel2765
    @krishbinpaudel2765 5 лет назад

    why cant i use opencv in pycharm built in ide

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  5 лет назад

      Sure you can, but you need to setup PyCharm to use the virtual environment in which you've installed OpenCV.

    • @krishbinpaudel2765
      @krishbinpaudel2765 5 лет назад

      @@AtoZProgrammingTutorials can you describe how?

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  5 лет назад

      @@krishbinpaudel2765 Sorry, I don't use PyCharm, try to search after "using PyCharm with virtual environments". You'll probably find something.

  • @800kpygame2
    @800kpygame2 2 года назад

    thanks

  • @dineshkumarreddy4661
    @dineshkumarreddy4661 4 года назад

    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,

    • @AtoZProgrammingTutorials
      @AtoZProgrammingTutorials  4 года назад

      Sorry, no idea. I didn't used Anaconda or Miniconda, I've used the Python installer for macOS from python.org.

  • @armagan_gok
    @armagan_gok 4 года назад

    I'm getting like : no such as job

  • @downtown-boy5031
    @downtown-boy5031 3 года назад

    when image window is getting open i am not able to close and jupyter kernel is crashing as well.

  • @lequangphuong5273
    @lequangphuong5273 4 года назад

    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