See https://matplotlib.org/3.1.1/tutorials/introductory/usage.html#what-is-a-backend
Previously in ansible-role-aiida, for debian:
- python3-gi
- python3-gi-cairo
- gir1.2-gtk-3.0
for redhat:
For debian, according to https://askubuntu.com/a/1166300, you should be able to just install with the generic python3-, then copy the so files for the required python version, e.g.
cp /usr/lib/python3/dist-packages/gi/_gi_cairo.cpython-36m-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/gi/_gi_cairo.cpython-37m-x86_64-linux-gnu.so
cp /usr/lib/python3/dist-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/gi/_gi.cpython-37m-x86_64-linux-gnu.so
cp /usr/lib/python3/dist-packages/cairo/_cairo.cpython-36m-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so
(I tested this and it looks to work; import gi, cairo fails before copy and works after)
See https://matplotlib.org/3.1.1/tutorials/introductory/usage.html#what-is-a-backend
Previously in ansible-role-aiida, for debian:
for redhat:
For debian, according to https://askubuntu.com/a/1166300, you should be able to just install with the generic
python3-, then copy the so files for the required python version, e.g.(I tested this and it looks to work;
import gi, cairofails before copy and works after)