I encountered this error when attempting to run a python3 script with the line import cv2. Seems like it is affected by my ROS kinetic installation
import cv2
ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type
Add this line to the top of the code
import sys
sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.