我正在尝试使用graph-tool
python 模块,顺便说一句,它真的很棒。为此,我有:
下载版本 2.2.30 ( http://downloads.skewed.de/graph-tool/graph-tool-2.2.30.tar.bz2 )
要编译模块,我必须使用此选项:--with-sparsehash-prefix=google
. 然后经过相当长的编译时间,我检查了编译,make check
一切似乎都很好。
但是,当我尝试执行快速入门(http://graph-tool.skewed.de/static/doc/quickstart.html)时,我得到了这个:
>>> from graph_tool.all import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/graph_tool/all.py", line 34, in <module>
from graph_tool.draw import *
File "/usr/lib/python2.7/dist-packages/graph_tool/draw/__init__.py", line 770, in <module>
from .cairo_draw import graph_draw, cairo_draw, get_hierarchy_control_points
File "/usr/lib/python2.7/dist-packages/graph_tool/draw/cairo_draw.py", line 51, in <module>
except ImporError:
NameError: name 'ImporError' is not defined
你能解释一下是什么问题以及如何解决它吗?