python import cv2报错 segmentation fault:11

在python中 import cv2报错 segmentation fault:11, 解决方法:


把 opencv目录下的python目录下的文件全部拷贝到python的安装目录,

例如opencv的安装目录是 /usr/local/opt/opencv, python安装目录是/usr/local/lib/python2.7


sudo cp /usr/local/opt/opencv/lib/python2.7/site-packages/*.*  /usr/local/lib/python2.7/site-packages/


似乎这样也可以:

sudo apt-get install python-opencv



你可能感兴趣的:(图像处理,python,opencv,segmentation,fault)