ubuntu中pycharm配置opencv2環境
阿新 • • 發佈:2017-05-28
rect ins oca 使用 code 後來 table 之間 sharp
在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之間建立鏈接即可
1 2 3 |
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
|
此時就可以使用了。
ubuntu中pycharm配置opencv2環境