有事没事领个红包

ubuntu中pycharm配置opencv2环境

在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

此时就可以使用了。

posted @ 2016-12-06 23:59  crazyCodeLove  阅读(3925)  评论(0编辑  收藏  举报