You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
Calling rosdep init fails when multiple versions of rospkg and/or rosdep packages are installed.
The error output message:
Traceback (most recent call last):
File "/usr/bin/rosdep", line 11, in<module>
load_entry_point('rosdep==0.22.1', 'console_scripts', 'rosdep')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
returnep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
returnself.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/rosdep2/__init__.py", line 45, in<module>
from .lookup import RosdepDefinition, RosdepView, RosdepLookup, \
File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 44, in<module>
from .sources_list import SourcesListLoader
File "/usr/lib/python3/dist-packages/rosdep2/sources_list.py", line 42, in<module>
from .gbpdistro_support import get_gbprepo_as_rosdep_data, download_gbpdistro_as_rosdep_data
File "/usr/lib/python3/dist-packages/rosdep2/gbpdistro_support.py", line 14, in<module>
from .platforms.debian import APT_INSTALLER
File "/usr/lib/python3/dist-packages/rosdep2/platforms/debian.py", line 34, in<module>
from rospkg.os_detect import (
ImportError: cannot import name 'OS_RASPBIAN' from 'rospkg.os_detect' (/usr/local/lib/python3.8/dist-packages/rospkg/os_detect.py)
Solution
Uninstall all versions of rosdep and rospkg and install them only through apt, which is the official way:
Issue
Calling
rosdep init
fails when multiple versions ofrospkg
and/orrosdep
packages are installed.The error output message:
Solution
Uninstall all versions of
rosdep
androspkg
and install them only throughapt
, which is the official way:Initialize
rosdep
:The
-E
flag preserves the user environment variables even when running the command with sudo.The text was updated successfully, but these errors were encountered: