[Matplotlib-devel] mpl_cairo manylinux wheel available

Antony Lee antony.lee at berkeley.edu
Sun Sep 17 16:20:02 EDT 2017

Yes, you can use this without conda (I usually don't use conda, it's just
an easy way for me to make sure people can install pycairo...).

There are two possibilites: compile the package yourself, or use the wheel
available under github releases.  In either case you need to install
Matplotlib with PR#8771 (so I'd suggest doing this in a venv); there are
(fairly standard) instructions for this in the README or in Matplotlib's
devdocs.  Assuming that you have installed the patched Matplotlib, you can
now do one of the following:

1. Compile the package yourself

According to pkgs.org,
  - g++ 7.1 is available in Fedora 26.
  - pycairo>=1.12 ("python3-cairo") is only available in Fedora Rawhide
(Fedora 26 has pycairo 1.10).

If you can install these dependencies, you should be able to just do the
standard `pip install .` or `pip install -e .` (in the same environment as
the patched Matplotlib) and you're good to go.

If you're stuck on Fedora 26, it looks like that version has cairo 1.14
(which is what we *really* care about).  So you should be able to get away
with installing the latest pycairo and cairo (1.14), and manually removing
the dependency on pycairo>=1.12 in mpl_cairo's setup.py.

2. Use the compiled wheel.

Basically everything under the "Installation (Linux only)" example still
applies -- just replace the invocation of conda with your dnf (and the
appropriate package names).  However in that case you will not be able to
edit the dependency in the wheel (which, again, requires pycairo>=1.12).
Let me know if this is the case, if so then I will build a wheel with a
lower dependency bound.


2017-09-17 8:26 GMT-07:00 Neal Becker <ndbecker2 at gmail.com>:

> Matthew Brett wrote:
> > On Sat, Sep 16, 2017 at 10:10 AM, Antony Lee
> > <anntzer.lee at gmail.com> wrote:
> >> Hi all,
> >> A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo)
> is
> >> now available (under GitHub releases).  mpl_cairo is a new, cairo-based
> >> backend for Matplotlib, that offers several improvements over the
> current
> >> default, Agg-based backend.  See the README on GitHub for more details
> >> :-) I would be interested in hearing your feedback.
> >
> > Nice!  Any plans for an OSX build?  Or are they hard?
> >
> > Cheers,
> >
> > Matthew
> I'm interested in trying this on Fedora linux - but I don't want to use
> anaconda.  Any suggestions?
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170917/9011db0a/attachment.html>

More information about the Matplotlib-devel mailing list