Public bug reported:

I am using Ubuntu 20.04.1 LTS (including python3-matplotlib
3.1.2-1ubuntu4)

To save a figure using matplotlib.pyplot into a jpg file, matplotlib
uses Python Imaging Library (PIL). Unfortunately even if we install the
package python3-pil 7.0.0-4ubuntu0.1 it fails:

File "/usr/lib/python3/dist-packages/matplotlib/backend_bases.py", line 1961, 
in _get_output_canvas
        raise ValueError(
    ValueError: Format 'jpg' is not supported (supported formats: eps, pdf, 
pgf, png, ps, raw, rgba, svg, svgz)

The reason is matplotlib detect PIL version by doing so (in file 
backend_bases.py line 57):
from PIL import PILLOW_VERSION

PILLOW_VERSION has been removed since PIL version 7.0 to be replaced by
PIL.__version__

To solve this issue it seems that you have to upgrade python3-matplotlib
package at least to version 3.3 (the version packaged for ubuntu 20.10,
I think)

** Affects: matplotlib (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1897283

Title:
  Incompatibility with python3-pil v7.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/1897283/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to