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

ImportError: No module named rospkg

asked 2015-07-01 02:26:04 -0600

Ruud gravatar image

Hey,

I'm trying to compile a rospackage, but I throws the following error:

ImportError: No module named rospkg

I checked if it is installed:

sudo apt-get install python-rospkg -> python-rospkg is already the newest version.

dpkg -L python-rospkg -> /usr/lib/python2.7/dist-packages

And if that is in my python path:

echo $PYTHONPATH -> /home/ruud/Dropbox/ros/catkin_workspace/devel/lib/python2.7/dist-packages:/opt/ros/indigo/lib/python2.7/dist-packages:/usr/lib/pymodules/python2.7:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/rospkg:/usr/lib/python2.7/dist-packages

The problem looks very similar to http://answers.ros.org/question/44669/fuerte-no-module-named-rospkg/

As far as I see 'rospkg' is not inside /usr/lib/pymodules/python2.7

Help! :) Ruud

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-01 02:51:31 -0600

Ruud gravatar image

I solved the issue by:

$ git clone git://github.com/ros/rospkg.git
$ sudo python setup.py install --user

Apparently rospkg was not installed properly? Still not sure what is the cause though..

edit flag offensive delete link more

Comments

1

Hm. If at all possible, I'd avoid using distutils / setuptools to install rospkg. I've seen way too many installs (of ROS) freak out after some time. It's probably better (but more involved) to figure out why the debian pkg doesn't seem to be working for you.

gvdhoorn gravatar image gvdhoorn  ( 2015-07-01 03:57:57 -0600 )edit

Yes I prefer to find the cause here. Currently it is fixed, but I did not learn a lot from it.. :)

Ruud gravatar image Ruud  ( 2015-07-02 03:41:58 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-07-01 02:26:04 -0600

Seen: 4,189 times

Last updated: Jul 01 '15