【发布时间】:2019-04-23 15:56:46
【问题描述】:
我安装了 ros1 并创建了一个 catkin 工作区。在 src 文件夹中,我克隆了一个 ros 包“executive_smach_visualization”。但是当我尝试使用以下命令运行它时,出现错误。
rosrun smach_viewer smach_viewer.py
追溯:
wxversion 2.8 is not installed, installed versions are ['3.0-gtk3']
Traceback (most recent call last):
File "/home/developer/catkin_ws/src/executive_smach_visualization/smach_viewer/scripts/smach_viewer.py", line 77, in <module>
from smach_viewer import xdot
File "/home/developer/catkin_ws/src/executive_smach_visualization/smach_viewer/src/smach_viewer/xdot/__init__.py", line 1, in <module>
import wxxdot
File "/home/developer/catkin_ws/src/executive_smach_visualization/smach_viewer/src/smach_viewer/xdot/wxxdot.py", line 22, in <module>
from xdot import *
File "/home/developer/catkin_ws/src/executive_smach_visualization/smach_viewer/src/smach_viewer/xdot/xdot.py", line 34, in <module>
import gobject
ImportError: No module named gobject
我已经尝试过:
1) 使用 pip 安装 goobject
2) 将 gobject 从 git 克隆到 catkin_ws、catkin_make 和 setup.bash 的 src 文件夹
可能是什么问题?如果我遗漏任何重要的输入,请告诉我。提前致谢。
【问题讨论】:
-
你有超过1个版本的python吗?
-
你的
pip --version输出是什么? -
@vishal 是的,我有 Python 2.7.15rc1 和 Python 3.6.7。
-
@Benyamin Jafari 命令“python -V”给出 python 2.7.15rc1,命令“python3 -V”给出 python 3.6.7
-
@Skanda 我想看
pip版本,而不是Python 版本。