0
votes

I have been trying to install OpenCV for ages now and finally I succeeded using this tutorial: http://www.pyimagesearch.com/2016/12/05/macos-install-opencv-3-and-python-3-5/.

However, whenever I try to import cv2 in IDLE, it is not found but I am certain I installed OpenCV.

The cv2.so file exists at: /usr/local/lib/python3.5/site-packages/cv2.so

I believe it may have something to do with the interpreter but I am not sure how to fix it. In terminal, when I try importing it, it works. I included the terminal message to prove it.

Terminal Message

Any help is appreciated. Thank you.

2

2 Answers

1
votes

ok i found the answer! after you activate the virtual environment with:

work on cv

type this on the terminal to open the IDLE with the current virtual environment

python -c "from idlelib.PyShell import main; main()"

or

python -m idlelib

and it will do the trick!

0
votes

Dumb approach but does your IDLE run the same python environment as your terminal?