Title: PyCharm does not find cv2 no matter what I try
Tags: python;opencv;pycharm
Question: I tried to install OpenCV in so many ways. I tried this tutorial:
https://docs.opencv.org/master/d0/db2/tutorial_macos_install.html
I tried using conda:
conda install -c conda-forge opencv
etc. etc.
But when I type in import cv2 it says:
PyCharm Image OpenCV
Does somebody have an idea?
Comment: just try to run it once.


Here is another answer: To install opencv you can either build it with CMake (like the link you tagged) or install a pre-built version of it (easier).
You can do the pre-built via PyCharm going to your project settings and adding the 'opencv-python' package or running pip install opencv-python
If you need both main and contrib modules you can install 'opencv-contrib-python' instead
Here's the package's page: https://pypi.org/project/opencv-python/
Comment for this answer: Hi, thanks for your reply. Let's say I try It again with CMake. My first question would be, do I build it in my working directory or somewhere else? Second, how would the find_package command in step 6 look exactly? It did not really work when I tried it...

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:04/27/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><opencv><pycharm>', 'Title': 'PyCharm does not find cv2 no matter what I try', 'ViewCount': 53, 'id': 61466905, 'user_AboutMe': None, 'user_AccountId': 17112376.0, 'user_DisplayName': 'Fabian', 'user_Reputation': 9.0, 'user_Views': 9.0, 'user_id': 12382824.0}}