1

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
fatbringer
  • 348
  • 2
  • 9
  • 19

1 Answers1

1

Found a simple workaround. Add this line to the top of the code

import sys 
sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
fatbringer
  • 348
  • 2
  • 9
  • 19