ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

cv_bridge node crashing with python3.8

asked 2021-05-14 20:43:46 -0600

lachie1011 gravatar image

Hi guys,

I am trying to use some yolov5 methods inside of a ros node. I am using cv_bridge to get the image to perform said yolov5 methods on. However, I am running into the following issue:

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

I believe this is because cv_bridge uses python2.7 by default but I am trying to use python3.8 in order to use the yolov5 functionality.

I have googled and followed a whole of tutorials such as (using melodic and python3.8 though): https://stackoverflow.com/questions/4...

But the build always fails citing that g++ cant fins a 'pyconfig.h' file cant be found:

                              'pyconfig.h: No such file or directory'

Any help would be very much appreciated!

I am using ubuntu18.04 on a virtual machine as well as ros melodic

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-18 09:40:39 -0600

FurkanEdizkan gravatar image

I might be wrong but the problem is cv_bridge as you mentioned, try using ros_numpy or any other alternative to get image info. Hope it solves your problem, it solved mine with python3 cv_bridge usage.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-05-14 20:43:46 -0600

Seen: 316 times

Last updated: Apr 18 '22