$ python -bash: /usr/local/bin/python: No such file or directory
Something seems to go haywire with Homebrew 1.7.2 and MacOS 10.13.6.
Even after removing all python versions and reinstalling, python --version
simply won't work.
Most have probably already tried these steps...
brew uninstall --ignore-dependencies python
brew uninstall --ignore-dependencies python2
brew uninstall --ignore-dependencies python3
brew install python
brew unlink python && brew link python
brew unlink python3 && brew link python3
At the end what worked for me was...
sudo ln -s /usr/local/bin/python3 /usr/local/bin/python
And then again for pip...
sudo ln -s /usr/local/bin/pip3 /usr/local/bin/pip
I've got no idea what happened here, but I tried reinstalling yesterday...reinstalling this way (seemingly what I already did) today worked:
How to fix broken python 2.7.11 after OSx updates