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

how to use python3.8 with ROS Kinetic in a node (import rospy)?

asked 2022-04-07 07:58:19 -0600

AA A gravatar image

updated 2022-08-17 11:50:48 -0600

lucasw gravatar image

Hey,

I am using ROS kinetic which supports python2.7. I want to run a node with python3.8 using rosrun.

when I used a shebang to test the script without any "import rospy" it worked.

but when I include "import rospy" to turn the script into a node and be able to send values, it gives me the following error: in <module> import yaml ModuleNotFoundError: No module named 'yaml'

I would greatly appreciate any idea to make ROS kinetic itself use python3.8 instead of python2.7 and fix this issue.

Thanks in advance

edit retag flag offensive close merge delete

Comments

2

Here are some similar answers that might help you:

ROS Kinetic and Python3 general

rospy and python3 specific

WarTurtle gravatar image WarTurtle  ( 2022-04-07 08:24:53 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-08 16:23:30 -0600

Can you update your system to a later version of ROS that uses Python 3.8? Noetic should do it.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-04-07 07:58:19 -0600

Seen: 235 times

Last updated: Apr 08 '22