P-M
P-M

Reputation: 1399

python: symbol lookup error: anaconda and cairo

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?

Upvotes: 1

Views: 3032

Answers (2)

John MacTavish
John MacTavish

Reputation: 41

Got similar issue executing python scripts (using RDKit). Did following:
$ conda update conda
$ conda update anaconda
This worked for me.

Upvotes: 0

Anivarth
Anivarth

Reputation: 679

If you are using anaconda on Ubuntu then you should do the following:

$ conda update conda
$ conda update anaconda

This should work. It worked for me.

Hope it helps.

Upvotes: 0

Related Questions