marvel-nccr / ansible-role-python

Ansible role for installing a specific base python version and environment
Other
1 stars 1 forks source link

option to install matplolib backends #6

Open chrisjsewell opened 3 years ago

chrisjsewell commented 3 years ago

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.

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)

chrisjsewell commented 3 years ago

as with #5 this aslso ideally requires testing

chrisjsewell commented 3 years ago

probably use python_mpl_gtk3 option