- 错误提示:
1 xy@xy:~/new_ws/src$ ./project_init.sh
2 ... logging to /home/xy/.ros/log/55f25158-a88d-11ea-8090-e86a642b9771/roslaunch-xy-15011.log
3 Checking log directory for disk usage. This may take awhile.
4 Press Ctrl-C to interrupt
5 Done checking log file disk usage. Usage is <1GB.
6
7 Traceback (most recent call last):
8 File "/opt/ros/kinetic/share/xacro/xacro.py", line 55, in <module>
9 import xacro
10 File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/__init__.py", line 35, in <module>
11 import glob
12 File "/usr/lib/python3.5/glob.py", line 4, in <module>
13 import re
14 ImportError: No module named 're'
15 Error in sys.excepthook:
16 Traceback (most recent call last):
17 File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 53, in apport_excepthook
18 if not enabled():
19 File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
20 import re
21 ImportError: No module named 're'
22
23 Original exception was:
24 Traceback (most recent call last):
25 File "/opt/ros/kinetic/share/xacro/xacro.py", line 55, in <module>
26 import xacro
27 File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/__init__.py", line 35, in <module>
28 import glob
29 File "/usr/lib/python3.5/glob.py", line 4, in <module>
30 import re
31 ImportError: No module named 're'
- 解决办法:
- .bashrc文件中不能有anaconda的python3相关环境声明;
- 系统中一定要把python的默认版本设置为python2,参考这个链接;