ImportError: No module named rospkg
Hello All,
After installing ROS on my Ubuntu, I was trying to follow the tutorials under the simulator_gazebo. But I have gotten an error message for this command:
rosrun gazebo spawn_model -file `pwd`/object.urdf -urdf -z 1 -model my_object
Error message:
ImportError: No module named rospkg
Could it be from the installation? I think everything went well during the installation.
Any thoughts?
Thanks,
Did you install Electric or Fuerte?
I followed instruction through this link http://www.ros.org/wiki/fuerte/Installation/Ubuntu. I guess it is Fuerte.
I am posting the entire message. Also version of python on my system is 2.7.1. Any help?
This can also happen if you are running the file with the wrong python interpreter. This might be the first thing you notice as import rospy is often the first import in a file. Not the problem here but this may be useful for others looking later
This should go as an edit to your original question.
thanks pjusesros. i forgot that i had set pyenv global python to be python3.8 after changing it to system python version everything worked fine. thanks for saving me from what otherwise was going to be a nightmare.