Hi Henri,
a quick Google search tells me that "
error 126" is probably related to your local python installation. Have you tried running your python script outside of Geany?
Please send the output you see or a screenshot. That would help us help you.
Yes, I also suspect this is what's happening. By default, macOS doesn't ship with python interpreter any more. You can either install it from the official python page or by installing XCode. Since I use XCode anyway, I only have experience with the XCode version. The XCode version doesn't provide the "python" program, just "python3" so you also have to change the execute command to "python3" in Geany.
Hope it helps.
Jiri