Many Alfred workflows rely on Python 2, but in the most recent upgrade of macOS (at the time of writing this article), namely macOS 12.3 Monterey, Apple decided to ditch the bundled version 2 of Python. As a consequence, you might have Alfred workflows that simply stopped working.
Thankfully, it should be fairly easy to get them working again, in two steps.
Install back Python 2.7 using homebrew
brew update brew install pyenv
Configure your shell to use
pyenv. See https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv for details. Here is how to do it with Zsh:
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc echo 'eval "$(pyenv init -)"' >> ~/.zshrc
You will need to relaunch your terminal session in order to use pyenv (quit your terminal app or run
Now you can install Python 2.7, and create a symlink to it in
pyenv install pypy2.7-7.3.6 // Create the symlink so Workflows find it ln -s ~/.pyenv/versions/pypy2.7-7.3.6/bin/python /usr/local/bin/python
Update your workflows
Now, head up to this list of Alfred Workflows updated for macOS Monterey 12.3, and download the workflows that are currently broken. Double click on the downloaded items, and it should open Alfred automatically and prompt you to upgrade the workflows.
Once upgraded, your workflows should start working again.