Fixing missing ‘python’ error in macOS
til
python
poetry
After the last macOS update, I started getting the following error when trying to run poetry install
:
I went through GitHub issues, StackOverflow questions, and blog posts, but none of the suggested solutions worked.
Finally, I found the solution somewhat hidden in this blog post.
So, what’s the fix?
🥁 🥁 🥁
Just add the following line to your .zshrc
file:
This gets the installation prefix for python
installed via Homebrew (e.g. /opt/homebrew/opt/[email protected]
), gets the libexec/bin
directory, and adds it to the PATH.
In that libexec/bin
, there’s a python
executable that gets called when you run python
in the terminal.
That’s all. Hope that helps!