【问题标题】:Activating cairo-dependent features of graph_tool激活 graph_tool 的 cairo 相关功能
【发布时间】:2023-04-10 15:28:01
【问题描述】:

我已经使用graph-tool library 有一段时间了,到目前为止我还没有真正使用过它的大部分绘图功能。今天在尝试使用graph_tool.draw.graph_draw时,我意识到我最初配置的图形工具没有cairo

./configure --disable-cairo

这正是 graph_draw 使用的图形库。如果我现在安装 cairo,有没有办法激活依赖 cairo 的 graph_tool 的功能,而无需删除并重新安装整个 graph_tool 模块?这将节省几个小时的重新安装时间。 (在我的机器上制作过程大约需要 3 个小时)。

【问题讨论】:

    标签: python cairo pycairo graph-tool


    【解决方案1】:

    您必须重新编译库,因为基于 cairo 的绘图是用 C++ 实现的。

    【讨论】:

    • 好的,谢谢,我会尽快重做整个事情。对于python2.7,py2cairo-1.10.0 found here是要安装的吗?
    • 与此相关的问题:Py3 Debian 拉伸包是否没有 cairo/graph 可视化工具? 'graph_draw' in dir(graph_tool.all)graph_tool.__version__ '2.26 (commit b89e6b4e, Thu Nov 9 14:55:43 2017 +0000)' 返回 False
    • 是的。也许您缺少一些运行时依赖项。
    • 谢谢。貌似是 cairo:RuntimeWarning: Error importing cairo. Graph drawing will not work. 说安装 Debian 包,除了 python3-graph-tool 还需要安装绘图库(GTK+ 3、cairomm、pycairo 和 matplotlib)对吗?
    猜你喜欢
    • 2011-02-03
    • 1970-01-01
    • 2017-01-12
    • 1970-01-01
    • 2021-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-03
    相关资源
    最近更新 更多