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

ImportError for any rosdep command

asked 2015-04-02 16:18:23 -0600

dinosaur gravatar image

Any rosdep command I try to run gives me the same error:

[robosalmon ~/catkin_ws_source_pkgs (localhost)]$ rosdep -h
Traceback (most recent call last):
  File "/usr/bin/rosdep", line 3, in <module>
    from rosdep2.main import rosdep_main
  File "/usr/lib/python2.7/dist-packages/rosdep2/", line 45, in <module>
    from .lookup import RosdepDefinition, RosdepView, RosdepLookup, \
  File "/usr/lib/python2.7/dist-packages/rosdep2/", line 44, in <module>
    from .sources_list import SourcesListLoader
  File "/usr/lib/python2.7/dist-packages/rosdep2/", line 49, in <module>
    from .gbpdistro_support import get_gbprepo_as_rosdep_data, download_gbpdistro_as_rosdep_data
  File "/usr/lib/python2.7/dist-packages/rosdep2/", line 19, in <module>
    from .platforms.debian import APT_INSTALLER
  File "/usr/lib/python2.7/dist-packages/rosdep2/platforms/", line 34, in <module>
    from rospkg.os_detect import OS_DEBIAN, OS_LINARO, OS_UBUNTU, OsDetect
ImportError: cannot import name OS_LINARO

I've tried sudo apt-get install python-rosdep and it was apparently successful, but didn't fix rosdep.

How can I fix rosdep?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-02 16:20:57 -0600

dinosaur gravatar image

Figured this out. The solution was to pip install it.

$ sudo pip install rosdep
edit flag offensive delete link more



This shouldn't be necessary. Which platform are you on?

ahendrix gravatar image ahendrix  ( 2015-04-02 17:16:38 -0600 )edit

result of $ uname -a: Linux robosalmon 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

dinosaur gravatar image dinosaur  ( 2015-04-06 18:48:32 -0600 )edit

I had the same problem when running "sudo rosdep init" and this solution appeared to fix it. On my system: $uname -a: Linux my-name 3.13.0-63-generic #103-Ubuntu SMP Fri Aug 14 21:42:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux.

I recently upgraded the computer from Precise to Trusty.

Jackson Carter gravatar image Jackson Carter  ( 2015-10-02 16:46:16 -0600 )edit

I suspect you have an out-of-date version of rospkg. Try upgrading rospkg with sudo apt-get install python-rospkg instead of installing rosdep through pip.

ahendrix gravatar image ahendrix  ( 2015-10-04 00:42:16 -0600 )edit

Question Tools

1 follower


Asked: 2015-04-02 16:18:23 -0600

Seen: 2,262 times

Last updated: Apr 02 '15