Looks like the recent update to OS X El Capitan version 10.11.6 breaks python installed via homebrew. At least it happened to me both on my work and my home machines.
If you are experience the same issue, you may see something that looks as following:
$ python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
$ pip
-bash: pip: command not found
~$ python --version
Python 2.7.10
~$ pip --version
-bash: pip: command not found
Code language: PHP (php)
Here are the steps that I took to fix the issue:
- Open
~/.bash_profilein my text editor of choice - Add the following line at the end of the file
export PATH="/usr/local/opt/python/libexec/bin:$PATH" - Save and exit the file
- From terminal, run
source ~/.bash_profile. Note that this step is optional, and needed only if you already had the terminal open.
After which, the pyhon again was getting loaded from the right path:
~$ python --version
Python 2.7.13
~$ pip --version
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
Code language: JavaScript (javascript)