在ubuntu中安裝pycharm、opencv2后。在pycharm環境中無法使用opencv,后來查資料顯示OpenCV is not pip-installable. You’ll need to manually sym-link your cv2.so and cv.py files into the site-packages directory。
經查看在/usr/local/lib/python2.7/dist-packages文件夾下有cv2.so and cv.py
現在只需要在/usr/local/lib/python2.7/site-packages 和/usr/local/lib/python2.7/dist-packages之間建立鏈接即可
cd /usr/local/lib/python2.7/site-packages ln -s /usr/local/lib/python2.7/dist-packages/cv.py cv.py ln -s /usr/local/lib/python2.7/dist-packages/cv2.so cv2.so
此時就可以使用了。