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

rosdep error: No module named platforms.debian

asked 2013-10-14 04:21:19 -0500

oferbtl gravatar image

updated 2013-11-14 10:57:11 -0500

tfoote gravatar image

I'm trying to install ROS Hydro on Ubuntu 12.04, following the instructions in the ROS Hydro docs.

When trying to run "rosdep update" or "rosdep", I'm getting the following error:

oferb@math306-pc:~$ rosdep update
failed to load symbols, rosdep will not function properly
Traceback (most recent call last):
  File "/usr/bin/rosdep", line 3, in <module>
    from rosdep2.main import rosdep_main
  File "/usr/share/pyshared/rosdep2/main.py", line 51, in <module>
    from .lookup import RosdepLookup, ResolutionError
  File "/usr/share/pyshared/rosdep2/lookup.py", line 44, in <module>
    from .sources_list import SourcesListLoader
  File "/usr/share/pyshared/rosdep2/sources_list.py", line 41, in <module>
    from .gbpdistro_support import get_gbprepo_as_rosdep_data, download_gbpdistro_as_rosdep_data
  File "/usr/share/pyshared/rosdep2/gbpdistro_support.py", line 11, in <module>
    from .platforms.debian import APT_INSTALLER
ImportError: No module named platforms.debian

What I've tried: I've tried uninstalling and reinstalling ros 3 times, even manually looking for leftover files to remove before reinstalling again. Google gives no clue as to what to do, except for a deleted, unanswered question regarding the same error: answers.ros.org/questions/66676/revisions/

What I've tried2: Looking at the error, "from .platforms.debian import APT_INSTALLER" looks like a failed relative import. The file /usr/share/pyshared/rosdep2/platforms/debian.py actually exists. I tried importing it derectly, but if I open python in the terminal and type "from .platforms.debian import APT_INSTALLER", I get a "ValueError: Attempted relative import in non-package". I thought about editing the package, changing the relative import to an absolute one, but I'm not sure what the syntax would be, and still, it seems like there should be different solution.

Any suggestions?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-10-14 23:11:19 -0500

oferbtl gravatar image

Solved my own question.

This is a PYTHONPATH issue.

I had /usr/share/pyshared in my PYTHONPATH, which shadowed /usr/lib/pymodules/python2.7 and caused the problem.

Solution: remove /usr/share/pyshared from PYTHONPATH (or put it after /usr/lib/pymodules/python2.7).

My suspicion is that ROS Fuerte put rosdep in /usr/share/pyshared, and even though I removed ROS Fuerte, the rosdep module remained and caused the problem. This is just speculation.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-10-14 04:21:19 -0500

Seen: 576 times

Last updated: Oct 14 '13