运行roscore时出现错误

今天用ros,在运行roscore时出现了如下错误

Traceback (most recent call last):
File “/opt/ros/kinetic/bin/roscore”, line 36, in
from rosmaster.master_api import NUM_WORKERS
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/init.py”, line 35, in
from .main import rosmaster_main
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/main.py”, line 43, in
import rosmaster.master
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master.py”, line 47, in
import rosmaster.master_api
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master_api.py”, line 72, in
from rosmaster.util import xmlrpcapi
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/util.py”, line 48, in
from defusedxml.xmlrpc import monkey_patch
ImportError: No module named ‘defusedxml’

发现是我把ubuntu中的python版本改成了python3.5,改回python2.7就好。
具体怎么更改python版本看一下我之前的博客 ^ _ ^

你可能感兴趣的:(运行roscore时出现错误)