Q1:ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type
使用https://blog.csdn.net/Jolen_xie/article/details/121634091?spm=1001.2014.3001.5501
Q2:但是出现ModuleNotFoundError: No module named ‘rospy’
把
import sys sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
放到
import rospy
的后面
import rospy import sys sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages') import cv2