Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613350 - dev-python/matplotlib-1.4.3 broken after upgrade to PyQt5-5.7.1
Summary: dev-python/matplotlib-1.4.3 broken after upgrade to PyQt5-5.7.1
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major with 1 vote (vote)
Assignee: Gentoo Science Related Packages
Depends on: 636054
  Show dependency tree
Reported: 2017-03-20 21:50 UTC by glyphimor
Modified: 2018-05-18 15:36 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description glyphimor 2017-03-20 21:50:08 UTC
After upgrading PyQt5 from 5.5.1 to 5.7.1, but with my matplotlib still at the latest stable (1.4.3), found that I couldn't generate any matplotlib plots from my python code.

The matplotlib bugs are 6853 ( for the report and 6854 ( for the PyQt 5.7 fix. Looks like it's been fixed in matplotlib master, 2.0.0 release candidate, and 1.5.3.

I resolved in gentoo by upgrading matplotlib from 1.4.3 to the latest unstable, 1.5.3-r1. That required installing 4 new packages, 2 of them unstable (dev-python/versioneer and dev-python/cycler). Presumably matplotlib ebuild should be modified to indicate that it won't work w/ PyQt5 >= 5.7?

For the record, the python stack trace:

  File "/usr/lib64/python3.5/site-packages/matplotlib/", line 828, in gca
    ax =  gcf().gca(**kwargs)
  File "/usr/lib64/python3.5/site-packages/matplotlib/", line 462, in gcf
    return figure()
  File "/usr/lib64/python3.5/site-packages/matplotlib/", line 435, in figure
  File "/usr/lib64/python3.5/site-packages/matplotlib/backends/", line 48, in new_figure_manager
    return new_figure_manager_given_figure(num, thisFig)
  File "/usr/lib64/python3.5/site-packages/matplotlib/backends/", line 56, in new_figure_manager_given_figure
    return FigureManagerQT(canvas, num)
  File "/usr/lib64/python3.5/site-packages/matplotlib/backends/", line 481, in __init__
TypeError: connect() failed between NavigationToolbar2QT.message[str] and _show_message()
Comment 1 M Ogrodnik 2017-03-27 12:28:27 UTC
Hi, I encountered the same exact problem, which is described here: 
In my case emerging live version of matplotlib (dev-python/matplotlib-9999 and few other packages) helped, but I'd rather use stable packages.
Comment 2 Philippe Trottier 2017-03-31 08:05:31 UTC
Confirmed here too on amd64, trying now 1.5.3-r1.
Comment 3 Philippe Trottier 2017-03-31 08:50:14 UTC
1.5.3-r1 works like a charm with PyQt5 5.7.1
Comment 4 Benda Xu gentoo-dev 2017-07-09 04:22:19 UTC
Thanks, please use the new versions.
Comment 5 Benda Xu gentoo-dev 2017-07-09 04:23:35 UTC
Close this after new versions have been stablized.
Comment 6 Till Schäfer 2017-11-28 19:45:52 UTC
currently this package fails for everybody upgrading to python 3.5. Can you please proceed with stabilizing this package?
Comment 7 Mark Knecht 2017-12-08 21:55:03 UTC
+1 for problems, +1 for 1.5.3-r2, +1 for having a stable package to builds
Comment 8 Luan Carvalho Martins 2017-12-08 23:00:01 UTC
Almost a year had passed and this bug is still here. Matplotlib is a important package, specially to academic users. This month I had to setup a Ubuntu virtual machine to prepare some plots to a paper. I know this is not the right place to say that, but I had to. I loved these last ten years of Gentoo. I learned a lot about Linux from it, it made me a better programmer and a better scientist. But it seems Gentoo just got stalled. Thank you very much for this wonderful distro. It was a pleasure to use it. I hope I can find the same feeling in the one I am installing this weekend.
Comment 9 John J. Aylward 2017-12-08 23:24:14 UTC
All you had to do was unmask a newer version... 9 months is a long time for this, but still, installing Ubuntu instead of a simple unmask is pretty drastic
Comment 10 Mark Knecht 2017-12-08 23:35:18 UTC
I agree but it's not only matplotlib. There are numerous packages that have these sorts of unaddressed issues. For those of us that depend on our machines for serious work, and additionally need to move forward in the technical world, unmasking packages is a lot of additional work over time. matplotlib is relatively easy. However Jupyter is used by lots of people and unmasking that one caused me to have to unmask 18 additional ~amd64 packages. I don't know how it is now by handbrake ended up being such a hassle that I set up an Ubuntu VM for nothing other than that one application. tensorflow and other technical programs get supported through overlays but it's a lot of extra work.

Anyway, I agree, switching distros is a big step. I've done VMs on at least 7-8 other distros during times of frustration, and I suspect that's where Luan is right now, but never pulled the trigger and left Gentoo. Sadly I think it will happen but likely not until I'm forced due to hardware failure or something big like that. (And I've booted Gentoo exclusively since about 2001 or 2002 so leaving would be a BIG deal to me.)
Comment 11 Luan Carvalho Martins 2017-12-09 01:33:23 UTC
Sorry for posting again. Honestly, I was in such a hurry to get the said plots I just did the first thing I thought of. And this pretty much sums up the issue: Gentoo is becoming too much time consuming. Unmasking chains, manual compiling of many programs which are not in the tree, broken system or programs after update and too manual intervention at each update. I wish matplotlib to be the only or main problem. And, for sure, I am not proud of giving up. It was a hard decision. The thing is: I must focus more on science and results I must acquire than on maintain my machine. Not trying to encourage anyone. Really. I hope for a better Gentoo in the future so I can go back to it.
Comment 12 Mark Knecht 2018-01-06 14:30:52 UTC
WRT John's comment, it isn't only unmasking matplotlb, but additionally unmasking other packages that aren't stable at this time also. That what we who like to be on a stable platform dislike about unmasking stuff:

c2RAID6 ~ # emerge -pvDuN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ~] dev-python/subprocess32-3.2.7::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7" 53 KiB
[ebuild  N     ] dev-python/setuptools_scm-1.15.0::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6" 24 KiB
[ebuild  N     ] dev-python/backports-functools-lru-cache-1.4-r1::gentoo  USE="-doc {-test}" PYTHON_TARGETS="python2_7 (-pypy)" 7 KiB
[ebuild     U ~] media-libs/qhull-2015.2::gentoo [2012.1-r4::gentoo] USE="-doc -static-libs" 987 KiB
[ebuild     U ~] dev-python/matplotlib-2.1.0-r1::gentoo [1.5.3-r2::gentoo] USE="cairo qt5 wxwidgets -doc -examples -excel -gtk2 -gtk3 -latex -pyside {-test} -tk (-fltk%) (-qt4%)" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 32277 KiB

Total: 5 packages (2 upgrades, 3 new), Size of downloads: 33346 KiB

The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by dev-python/matplotlib-2.1.0-r1::gentoo
# required by @selected
# required by @world (argument)
=dev-python/subprocess32-3.2.7 ~amd64
# required by dev-python/matplotlib-2.1.0-r1::gentoo
# required by @selected
# required by @world (argument)
=media-libs/qhull-2015.2 ~amd64
c2RAID6 ~ #

I've gone a different way - using virtualenv and pip within that environment. It all seems to run fine, I get access to all stable versions of python packages and don't have to deal with this set of problems. Pretty reasonable and keeps me on Gentoo for now.
Comment 13 Andreas Sturmlechner gentoo-dev 2018-01-07 00:24:57 UTC
(In reply to Mark Knecht from comment #10)
> I don't know how it is now by handbrake
Not much one can do about horribly broken build systems.

Everyone interested in a new stable matplotlib should head over to bug 636054 and maybe help fix it.
Comment 14 Andreas Sturmlechner gentoo-dev 2018-05-08 05:53:26 UTC
Cleanup done in fe830575e425a875093a98fc75702338dba6b35a.