python3 同时使用ros 和opencv 时出现以下报错:
ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so:
undefined symbol: PyCObject_Type
解决办法:
#先移除该路径
import sys
sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
#再导入opencv
import cv2
python3 同时使用ros 和opencv 时出现以下报错:
ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so:
undefined symbol: PyCObject_Type
解决办法:
#先移除该路径
import sys
sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
#再导入opencv
import cv2