<p dir="ltr">On Apr 25, 2016 10:38 AM, "Matthew Brett" <<a href="mailto:matthew.brett@gmail.com">matthew.brett@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I am building matplotlib manylinux wheels:<br>
><br>
> <a href="https://github.com/matthew-brett/manylinux-builds/blob/master/build_matplotlibs.sh">https://github.com/matthew-brett/manylinux-builds/blob/master/build_matplotlibs.sh</a><br>
><br>
> The problem is, what to do about the default matplotlib tk optional dependency?<br>
><br>
> Normally, matplotlib builds against the installed system tk libs :<br>
> <a href="https://github.com/matplotlib/matplotlib/blob/master/setupext.py#L1522">https://github.com/matplotlib/matplotlib/blob/master/setupext.py#L1522</a><br>
><br>
> When building a manylinux wheel, we can only build against the tk libs<br>
> / headers on the manylinux docker image, by doing `yum install -y<br>
> tk-devel` before building.<br>
><br>
> This means that the tk that matplotlib is built against, is different<br>
> from the one that Python uses with `import Tkinter`. I suppose that<br>
> is what causes the following, when building matplotlib with tk-devel<br>
> installed:<br>
><br>
> >>> import matplotlib<br>
> >>> matplotlib.get_backend()<br>
> u'TkAgg'<br>
> >>> import matplotlib.pyplot as plt<br>
> >>> plt.plot(range(10))<br>
> [<matplotlib.lines.Line2D object at 0x7f2a8e4b4390>]<br>
> >>> plt.show()<br>
> Segmentation fault<br>
><br>
> I don't immediately see a good way to deal with this. Any thoughts?</p>
<p dir="ltr">Maybe obvious, but here's a syllogism:</p>
<p dir="ltr">If:<br>
matplotlib and python have to agree on which tk libs they are using,<br>
and:<br>
there are inconsistencies between tk libs on different Linux systems such that matplotlib must be built against the same tk as it eventually uses,<br>
then:<br>
we don't really have any option except to disable tk support in matplotlib manylinux wheels</p>
<p dir="ltr">So I guess the question to focus on are whether those two premises are actually true. I guess a backtrace on the segfault would help?</p>
<p dir="ltr">Also: how important is tk support? Do we have a fallback? I know that Qt packaging is something of a mess right now too...</p>
<p dir="ltr">-n</p>