See my remark above about the availability of the Python support in Gimp in recent Linux distros.
You will know you have a working Python support when you have a working Filters > Python-fu > Console in the UI.
You will know you have a working Python support when you have a working Filters > Python-fu > Console in the UI.