ros-infrastructure / catkin_pkg

Standalone Python library for the catkin build system.
https://github.com/ros/catkin
Other
47 stars 91 forks source link

When installing ROS in Ubuntu20.04 ,sudo rosdep init , the terminal occurs “ModuleNotFoundError: No module named 'catkin_pkg.package'” #353

Open xmr110480 opened 1 year ago

xmr110480 commented 1 year ago

When I was installing ROS noetic, I typed sudo rosdep init, an ModuleNotFoundError occured: (base) tongji@tongji-Nuvo-8108GC-Series:~$ sudo rosdep init [sudo] password for tongji: Traceback (most recent call last): File "/usr/local/bin/rosdep", line 5, in <module> from fixed_rosdep.main import rosdep_main File "/usr/local/lib/python3.8/dist-packages/fixed_rosdep/__init__.py", line 45, in <module> from .lookup import RosdepDefinition, RosdepView, RosdepLookup, \ File "/usr/local/lib/python3.8/dist-packages/fixed_rosdep/lookup.py", line 41, in <module> from .rospkg_loader import RosPkgLoader File "/usr/local/lib/python3.8/dist-packages/fixed_rosdep/rospkg_loader.py", line 39, in <module> import catkin_pkg.package ModuleNotFoundError: No module named 'catkin_pkg.package' Then I tried installing catkin_pkg, but the error remains. (base) tongji@tongji-Nuvo-8108GC-Series:~$ pip install catkin_pkg Requirement already satisfied: catkin_pkg in ./anaconda3/lib/python3.8/site-packages (0.5.2) Requirement already satisfied: docutils in ./anaconda3/lib/python3.8/site-packages (from catkin_pkg) (0.16) Requirement already satisfied: setuptools in ./anaconda3/lib/python3.8/site-packages (from catkin_pkg) (67.6.1) Requirement already satisfied: pyparsing in ./anaconda3/lib/python3.8/site-packages (from catkin_pkg) (3.0.6) Requirement already satisfied: python-dateutil in ./anaconda3/lib/python3.8/site-packages (from catkin_pkg) (2.8.2) Requirement already satisfied: six>=1.5 in ./anaconda3/lib/python3.8/site-packages (from python-dateutil->catkin_pkg) (1.16.0) (base) tongji@tongji-Nuvo-8108GC-Series:~$ sudo rosdep init [sudo] password for tongji: Traceback (most recent call last): File "/usr/local/bin/rosdep", line 5, in <module> from fixed_rosdep.main import rosdep_main File "/usr/local/lib/python3.8/dist-packages/fixed_rosdep/__init__.py", line 45, in <module> from .lookup import RosdepDefinition, RosdepView, RosdepLookup, \ File "/usr/local/lib/python3.8/dist-packages/fixed_rosdep/lookup.py", line 41, in <module> from .rospkg_loader import RosPkgLoader File "/usr/local/lib/python3.8/dist-packages/fixed_rosdep/rospkg_loader.py", line 39, in <module> import catkin_pkg.package ModuleNotFoundError: No module named 'catkin_pkg.package' How can I solve this problem?