[Matplotlib-devel] Manylinux external library test case - matplotlib, tk

Matthew Brett matthew.brett at gmail.com
Mon Apr 25 13:37:19 EDT 2016


I am building matplotlib manylinux wheels:


The problem is, what to do about the default matplotlib tk optional dependency?

Normally, matplotlib builds against the installed system tk libs :

When building a manylinux wheel, we can only build against the tk libs
/ headers on the manylinux docker image, by doing `yum install -y
tk-devel` before building.

This means that the tk that matplotlib is built against, is different
from the one that Python uses with `import Tkinter`.  I suppose that
is what causes the following, when building matplotlib with tk-devel

>>> import matplotlib
>>> matplotlib.get_backend()
>>> import matplotlib.pyplot as plt
>>> plt.plot(range(10))
[<matplotlib.lines.Line2D object at 0x7f2a8e4b4390>]
>>> plt.show()
Segmentation fault

I don't immediately see a good way to deal with this.  Any thoughts?



More information about the Matplotlib-devel mailing list