I just switched from MacPorts to HomeBrew. After installing all the required XCode versions and other software I tried installing python using homebrew: I think it successfu
I use these commands to solve it.
mkdir /usr/local/lib
mkdir /usr/local/lib/pkgconfig
brew link python
You can follow these steps.
$ python3 --version
$ brew unlink python@2
$ brew link python3
$ python3 --version
This answer is for upgrading Python 2.7.10 to Python 2.7.11 on Mac OS X El Capitan . On Terminal type:
brew unlink python
After that type on Terminal
brew install python
brew switch to python3 by default, so if you want to still set python2 as default bin python, running:
brew unlink python && brew link python2 --force