python无法调用cv2(对于较新版本的 OSX)
开机时, 直接command + r 进入终端把sip关了就好了
pycharm无法调用cv2
In the end I ended up having to set an environment variable directly in the Pycharm Run ->Edit Configurations -> Run/Debug Configurations -> Environment Variables panel. I added the following option after you hit the edit button: set name to PYTHONPATH and value to /usr/local/lib/python2.7/site-packages:$PYTHONPATH which should display in the input box after editing asPYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH. Also, I made sure to log out and log back in of osx which also worked for a couple other path related issues.
source:http://stackoverflow.com/questions/10987834/importerror-no-module-named-cv2-when-running-django-project-from-pycharm-ide