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

why do I get ImportError: No module named rospkg, when I run my code

asked 2021-07-17 21:18:01 -0600

bribri123 gravatar image

I am using ros noetic on a rasberry pi running ubuntu desktop 20.04 and I do not have anaconda installed. my code use to work untill I got this bug I am somewhat new to ros

edit retag flag offensive close merge delete

Comments

1

I think it may be because i am using python2 and i have my packages for 3

bribri123 gravatar image bribri123  ( 2021-07-17 22:50:54 -0600 )edit
1

Noetic uses Python 3, so unless you changed something yourself, it should not be using Python 3.

gvdhoorn gravatar image gvdhoorn  ( 2021-07-18 01:28:21 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-07-18 04:12:14 -0600

electrophod gravatar image

Make sure you have the right shebang (which points to the Python3 executable) in your ROS scripts

edit flag offensive delete link more

Comments

1

it worked thank you so much

bribri123 gravatar image bribri123  ( 2021-07-18 10:14:44 -0600 )edit

Question Tools

Stats

Asked: 2021-07-17 21:18:01 -0600

Seen: 200 times

Last updated: Jul 18 '21