问题遇到的现象和发生背景
运行roscore出现ModuleNotFoundError: No module named error
用代码块功能插入代码,请勿粘贴截图
运行结果及报错内容
Traceback (most recent call last):
File "/opt/ros/noetic/bin/roscore", line 37, in
from roslaunch.nodeprocess import DEFAULT_TIMEOUT_SIGINT, DEFAULT_TIMEOUT_SIGTERM
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/init.py", line 52, in
from . import param_dump as roslaunch_param_dump
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/param_dump.py", line 40, in
import roslaunch.config
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/config.py", line 45, in
import rospkg.distro
File "/usr/lib/python3/dist-packages/rospkg/distro.py", line 44, in
import yaml
File "/usr/lib/python2.7/dist-packages/yaml/init.py", line 2, in
from error import *
ModuleNotFoundError: No module named 'error'
我的解答思路和尝试过的方法
我怀疑是python版本不同导致,已卸载python2,并且csdn中没有其他的解答
我想要达到的结果
运行roscore成功