1

When ever I say import cv2 and run in IDLE it gives me an error saying:

Traceback (most recent call last): File "/Users/Victor/Documents/Python Related/Python Code for Class/blah.py", line 2, in import cv2 ImportError: No module named 'cv2'

But when ever I run "brew install opencv" on my Terminal it says:

Warning: homebrew/science/opencv-2.4.13.2 already installed, it's just not linked.

Which I am taking it as Opencv is already installed. I have no idea why it wont work when I run it in python. I have followed this link and I also used this link.

but that did not seem to help much. I have spent all day on trying to make this work ...

Wanted to see if anyone who has experience with OpenCV can give me a bit of guidance. It is definitely not as simple as installing pygame or other models.

1

1 Answer 1

1

Try export PYTHONPATH=/usr/local/lib/python{version}/site-packages:$PYTHONPATH

Sign up to request clarification or add additional context in comments.

1 Comment

@felipsmartins A code-only answer might not be a good one, but it's still an answer. I would recommend you this post about the LQPRQ: You're doing it wrong: A plea for sanity in the Low Quality Posts queue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.