python macros - all buttons disabled

Version: 6.4.2.2
Build ID: 1:6.4.2-0ubuntu3

With menu: Tools/Macros/Organize Macros/Python

There is a dialog with , on the left, a tree menu showing various installed python macros. On the right is a panel of buttons for ‘Edit’ ‘Run’ and so on. All these buttons are disabled (grayed and unresponsive).

What do I need to activate this feature?

LibreOffice does not currently ship with a built-in Python editor like the Basic IDE. I never use Tools → Macros → Organize Macros → Python because it has very limited functionality.

Instead, download and install the APSO extension. APSO is not required to write Python macros, but it puts scripts in the correct locations, which is helpful for beginners and can even be convenient for experts. APSO can also embed Python scripts in LibreOffice documents for you, which would otherwise require unzipping and zipping the document as well as configuring XML files.

You will need to choose a text editor, which IMHO is good especially for Python because you can choose an editor that helps with spaces. The Basic IDE is limited in many ways. Personally, I use GVim, and if there are any spacing inconsistencies, :retab automatically fixes them. Notepad++ is another option I would recommend if you want something simpler and are using Windows (which you aren’t, according to your question, so just ignore that suggestion). PyCharm can also be used but must be set up carefully to get it to work with LibreOffice.

Python macros can also be run without APSO just like Basic macros, by going to Tools → Macros → Run Macro. Or, Python macros can be run from a command line on a listening instance of LibreOffice. See Interface-oriented programming in OpenOffice / LibreOffice : automate your office tasks with Python Macros.