python - ImportError: /home/pi/cv2.so: undefined symbol: _PyUnicode_AsString -
hi have raspberry pi 2 model b raspbain installed on it, want machine vision applications installed opencv 3.0.0 version python 3+ following tutorial: http://www.pyimagesearch.com/2015/07/27/installing-opencv-3-0-for-both-python-2-7-and-python-3-on-your-raspberry-pi-2/#comment-364261
i wanted compile first program (which took here https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_image_display/py_image_display.html#display-image):
import numpy np import cv2 img = cv2.imread('messi5.jpg',0) cv2.imshow('image',img) k = cv2.waitkey(0) if k == 27: cv2.destroyallwindows()
and error:
importerror: no module named cv2.cv
so searching found this: opencv - cannot find module cv2 , added:
import sys sys.path.append('/usr/local/lib/python2.7/site-packages')
to code (changing python2.7 python3.2 because that's 1 have) , error this:
importerror: /home/pi/cv2.so: undefined symbol: _pyunicode_asstring
i verified opencv correctly installed typing following command in terminal:
$ workon cv $ python >>> import cv2 >>> cv2.__version__ '3.0.0'
so that's did, i'm new linux, rpi, python , opencv. aprreciate help, lot
Comments
Post a Comment