Brew Python 2



  1. Brew Python 2 Download
  2. Brew Python 2.6
Brew uninstall python 2.7

I missed the memo, but back in January Homebrew announced that as of version 1.5, python would be upgraded to use Python 3.x. This change went live on March 1, and I noticed it over the weekend while tinkering with Homebridge.

2.7

Brew Python 2 Download

While I was rebuilding Homebridge with the latest version of Node.js, I kept banging into node-gyp errors having to do with using Python 3.x. I’m not alone, though there is already a pull request to fix this issue.

Brew python 2020Tutorial

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 Solution no. 9: The problem with me is that I have so many different versions of python, so it opens up a different python3.7 even after I did brew link.

Since 1st March 2018 the python formula will be upgraded to Python 3.x, while a new python@2 formula will be added for Python 2.7, specifically. See changes announcement here or the final doc about using Homebrew for Python here. Nov 07, 2020 Since 1st March 2018 the python formula will be upgraded to Python 3.x, while a new python@2 formula will be added for Python 2.7, specifically. See changes announcement here or the final doc about using Homebrew for Python here. Python has been installed as $(brew -prefix)/opt/python@3.7/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. The executables are organized as follows so that Python 2 and Python 3 can both be installed without conflict: python3 points to Homebrew’s Python 3.x (if installed) python2 points to Homebrew’s Python 2.7.x (if installed) python points to Homebrew’s Python 2.7.x (if installed) otherwise the macOS system Python. Check out brew info python.

For the time being, I’ve made two changes to please node-gyp:

  1. Forced a link of the new python@2 keg1:

  2. Added the following to my ~/.bash_profile, so that python will point at python2:

Brew Python 2.6

I think I’ll revert the second change once the node-gyp issue is resolved, to begin forcing myself to use Python 3.x.

Brew
  1. This puts python2 into /usr/local/bin/, effectively adding it to my path. ↩