How do I make Python3 the default Python in Geany

Add '3' to the end of "python" on the Build->Set Build Commands menu, as mentioned above.

Under Python commands, you should see:

  1. Compile python -m py_compile "%...

Add '3' to the end of python here

  1. Compile python3 -m py_compile "%...

enter image description here


First at all: Don't change the global configuration for something like this, as this will change default behaviour for all system users and might lead into confusion.

The changes inside file /usr/share/geany/filetypes.python will be overwritten in changes done inside your home on ~/.config/geany/filedefs/filetypes.python.

When using the menu Build->Set Build Commands it will be saved also there. In fact, there is no need to update the file manually, but via the menu. This will also have the advantage, changes will be visible without restarting Geany.