rosdep update turns error in ROS Noetic Ubuntu 20.04
I'm new at ROS and I'm facing this problem. I actually installed noetic version in my Ubuntu 20.04 but for some reason when I build my ORB SLAM3 package I installed python3-rosdep2
and since after that I was facing lots of error. Decided to uninstall noetic and reinstall again. But, when I run rosdep update
I got this error:
Traceback (most recent call last):
File "/usr/bin/rosdep", line 11, in <module>
load_entry_point('rosdep==0.22.1', 'console_scripts', 'rosdep')()
File "/opt/ros/noetic/lib/python3/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/opt/ros/noetic/lib/python3/dist-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/opt/ros/noetic/lib/python3/dist-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/opt/ros/noetic/lib/python3/dist-packages/pkg_resources/__init__.py", line 2449, 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 33, in <module>
import yaml
File "/opt/ros/noetic/lib/python3/dist-packages/yaml/__init__.py", line 2, in <module>
from error import *
ModuleNotFoundError: No module named 'error'
I hope someone can tell me what's going on. I believe this must be related to python3-rosdep2
Asked by nndorenji on 2022-10-19 03:13:13 UTC
Answers
You appear to have installed python packages such as yaml
and pkg_resources
into your /opt/ros/noetic
environment. This was likely done via a pip install with sudo while sourcing your noetic environment?
That's likely giving you a weird environment that has mismatched versions or missing dependencies. Uninstalling and reinstalling the debian packages won't clear any modules that you've installed via pip to that workspace. You will need to manually clear out anything that was installed separately, aka via pip.
Asked by tfoote on 2022-11-07 15:55:38 UTC
Comments