My setup is LibreOffice 5.1.1.3 running under OS X 10.11.4. When I open Tools/Macros/Organize Macros/python…, Create and Edit are ghosted. However if I go to LibreOffice Macros/HelloWorldPython, “Run” gets unghosted and if I click on it, the macro seems to run and a new Text Document appears with the words “Hello World (in Python)”.
So python seems to be installed and working, but I can’t create or edit any python macros. I then used Spotlight to search my entire harddrive for any .py files that might be associated with LibreOffice but couldn’t find anything.
Searching the web there are some potential solutions that include a lot of command line adding of packages, etc., but I don’t want to do that until I’ve exhausted the simple solutions (since python for LibreOffice already seems to be installed and working, and LibreOffice clearly knows it’s there).
Any ideas about what’s going on?
4/30 Update:
Back to OS X after a month of successful macro development in Windows and linux. Per karolus’s suggestion, I tried putting my macro in ~/.config/libreoffice/4/user/Scripts/python/
. That’s what works for Ubuntu 16.04 (and a similar directory for Win 10), but macros placed there don’t appear in as calc macros under OS X.
So I thought I’d try putting my macro where I know calc does find macros.
find /Applications/ -name 'HelloWorld.py'
returns
/Applications//LibreOffice Vanilla.app/Contents/Resources/Scripts/python/HelloWorld.py
, but
ls -l /Applications//LibreOffice Vanilla.app/Contents/Resources/Scripts/python/
tells me “No such file or directory”.
I think there’s some sort of weird outside-standard-*nix file structure going on. In any case this is clearly not the correct path for user macros.
So still stuck. Like this guy from over a year ago.