NS3进行可视化编译时出错AttributeError: 'module' object has no attribute 'require_foreign'

在安装NS3后想通过可视化界面看示例编译出错

@ubuntu:~/software/ns-allinone-3.29/ns-3.29$ ./waf --pyrun src/flow-monitor/examples/wifi-olsr-flowmon.py --vis
Waf: Entering directory `/home/Alao8B/software/ns-allinone-3.29/ns-3.29/build'
[2497/2757] Linking build/examples/tutorial/ns3.29-third-debug
Waf: Leaving directory `/home/Alao8B/software/ns-allinone-3.29/ns-3.29/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (5.867s)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/XXX/software/ns-allinone-3.29/ns-3.29/src/visualizer/visualizer/__init__.py", line 2, in <module>
    from core import start, register_plugin, set_bounds, add_initialization_hook
  File "/home/XXX/software/ns-allinone-3.29/ns-3.29/src/visualizer/visualizer/core.py", line 41, in <module>
    gi.require_foreign("cairo")
AttributeError: 'module' object has no attribute 'require_foreign'

请问大家有没有遇到类似问题 谢谢

Alao8B
Alao8B 你好 你这个问题有没有解决 我也遇到了同样的问题 求指导 谢谢
2 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐