Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ImportError: No module named rospkg


I use Ubuntu 16.04 LTS, ROS Kinetic, and Anaconda. Python 3.6 is my default python. Now I'm following ROS Tutorials, particularly this part:

So I wanna run this command:

$ rosrun rqt_graph rqt_graph

But I get this Error messages all the time,

rosrun rqt_graph rqt_graph
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/rqt_graph/rqt_graph", line 5, in <module>
    from rqt_gui.main import Main
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_gui/", line 38, in <module>
    import rospy
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 52, in <module>
    import roslib
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/", line 50, in <module>
    from roslib.launcher import load_manifest
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/", line 42, in <module>
    import rospkg
ModuleNotFoundError: No module named 'rospkg'

I've already installed ROS Packages with:

 sudo apt-get install python-rospkg

And I get the same problem in venv as well. Thank you in advance for your answers. :)