0

I have compiled graph-tool from source on Ubuntu 16.04 using ./configure CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs" PYTHON="/home/pmj27/anaconda2/bin/python2.7" CAIROMM_LIBS="-L/home/pmj27/anaconda2/include/cairomm-1.0/cairomm" --enable-openmp. I am now trying to run a script using graph-tool but at the following snippet it throws an error:

gt.graph_draw(g,pos = gt.arf_layout(g, max_iter=0),output_size=(3000,3000),vertex_surface = image, vertex_size = 150, vertex_halo=False, vertex_fill_color=color,vertex_shape=shape,edge_pen_width = number, output='scheme1.pdf')

The error message I get is:

python: symbol lookup error: /home/pmj27/anaconda2/lib/python2.7/site-packages/graph_tool/draw/libgraph_tool_draw.so: undefined symbol: _ZN5Cairo7ContextC1EP6_cairob

The first piece of advice I was given on the graph-tool mailing list was that I would need to add the path to the cairo library. To do this I added

export LD_LIBRARY_PATH="/home/pmj27/anaconda2/lib"

to ~/.bashrc and ~/.profile. This did not solve my problem and now Nautilus won't start anymore and instead raises the following error:

nautilus: symbol lookup error: /home/pmj27/anaconda2/lib/libgdk-3.so.0: undefined symbol: cairo_surface_set_device_scale 

Does anybody know what I would need to do to solve this problem? How would I find where the cairo libraries are/what file am I looking for there?

4

2 回答 2

0

如果您在 Ubuntu 上使用 anaconda,那么您应该执行以下操作:

$ conda update conda
$ conda update anaconda

这应该有效。它对我有用。

希望能帮助到你。

于 2017-04-15T05:35:22.873 回答
0

执行 python 脚本时遇到类似问题(使用 RDKit)。做了以下事情:
$ conda update conda
$ conda update anaconda
这对我有用。

于 2018-10-09T10:30:29.610 回答