xbar
xbar copied to clipboard
Python scripts fail on macOS 12.3 Beta
I upgraded to macOS 12.3 Beta and now some Python plugins do not work
For example the ProductHunt Plugin gives this error:
env:python No such file or directory
I believe this is because Python 2.7 is no longer included in macOS 12.3
I installed Python 3 and Python 2.7 manually but still get this error.
Is the script compatible with both Python 3 and Python 2.7? Or just 2.7?
In any event how do I configured the environment so it works?
It looks like Python 3 is being used instead of Python 2, now that mac macOS 12.3 no longer includes Python. Also, the Product Hunt - Today in Tech plug-in is not compatible with Python 3 (here is a pull request to upgrade it).
It seems that the issue persists with multiple plugins. Any way we can fix that for all plugins?
Not unless you want to break your global Python installation. It's possible to install Python 2 and replace #!/usr/bin/env python
with #!/usr/local/bin/python2
in individual scripts, it's not a good idea though.
Converting existing scripts to Python 3 isn't that difficult, the 2to3 tool helps with converting a script to Python 3.
I wonder how many plug-ins even still work though, the mentioned Slack plug-in shouldn't.