2

Environment

  1. Ubuntu 16.04
  2. Python 3.5.2
  3. Ros Distribution-Kinetic

Ros was installed as per installation instruction (sudo apt-get install ros-kinetic-full-desktop) And to make the Python3 as default version, I followed the necessary and sufficient step of install python3 versions of rospkg and catkin(sudo pip3 install rospkg catkin_pkg). After which i am able to import cv2 in python2 but not in python3 as below

ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type

To solve this I install the opencv3 with (pip3 install opencv-python) and then force a symbolic link as mentioned here But then i am unable to use cv bridge and get the below error

from cv_bridge.boost.cv_bridge_boost import getCvType

ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)

So whats the right way to install ROS such that the python version is python3 and am able to import opencv and corresponding dependencies?

zishan ahmed
  • 101
  • 1
  • 9
  • 1
    This helped me: https://stackoverflow.com/questions/49221565/unable-to-use-cv-bridge-with-ros-kinetic-and-python3?rq=1 – Minjee Kim Aug 03 '18 at 00:51

0 Answers0