ubuntu安装opencv后,无法导入import cv2

pip install opencv-python

然后,将cv2.so复制至python目录下

find / -name cv2.so,找到cv2.so,在Opencv的安装目录下

sudo cp ./cv2.so /usr/loccal/lib/python2.7/site-pachages/

这时,再执行python

输入import cv2即可

 

你可能感兴趣的:(python,ubuntu,opencv)