ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

ImportError: No module named rospkg

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

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 -0500

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 imagegvdhoorn ( 2015-07-01 03:57:57 -0500 )edit

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

Ruud gravatar imageRuud ( 2015-07-02 03:41:58 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 3,479 times

Last updated: Jul 01 '15