python + igraph“无法绘制" [英] python + igraph "plotting not available"

查看:63
本文介绍了python + igraph“无法绘制"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从RHEL机器上的源代码安装了python-igraph 0.5.4和igraph 0.5.4(也经过测试0.6).一切都很好,除了我尝试绘制时会得到.

I installed python-igraph 0.5.4 and igraph 0.5.4 (also tested 0.6) from source on a RHEL machine. All is fine except when I try to plot I get.

"TypeError:绘图不可用"

"TypeError: plotting not available"

在配置或安装阶段没有错误或警告.

There were no errors or warnings in the configure or install stages.

我需要在Linux上安装什么才能使绘图工作?我没有root用户,因此需要从源代码安装它.

What do I need to install on linux to get plotting to work? I don't have root so will need to install it from source.

推荐答案

igraph使用Cairo库进行绘图,因此您将需要Cairo及其Python接口.很有可能开罗已经安装在您的计算机上(在/usr/lib/usr/lib64中查找名为libcairo*的文件),因此您只需要开罗的Python接口.

igraph uses the Cairo library for plotting, so you will need Cairo and its Python interface. Chances are that Cairo is already installed on your machine (look for files named libcairo* in /usr/lib and /usr/lib64), so you just need the Python interface of Cairo.

不过有一个问题.为了编译Cairo的Python接口,您将需要Cairo的头文件,这些头文件可能会或可能不会出现在您的系统中.如果未安装它们,则可以下载Cairo的源代码并从中获取包含文件.

There is one catch, though. In order to compile the Python interface of Cairo, you will need Cairo's header files, which might or might not be present on your system. If they are not installed, you can download Cairo's source and get the include files from there.

这篇关于python + igraph“无法绘制"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆