Install python@2 on a Mac after python 2 support has ended on Homebrew

Viewed 21152

I would like to install a few packages from a github project and one of the dependencies is python@2.

Prior to Jan 1 2020, it was possible to install python@2 using Homebrew:

$ brew install python@2

However, Python 2 support has ended from Homebrew. Is there anyway to install python@2 on a Mac now that Python 2 support has ended?

Until the code in this project is ported to Python 3, unfortunately I'm stuck with getting it to work with Python 2 (and dependencies which use Python 2), which is the reason I would like to install python@2 as a temporary solution.

1 Answers

I was able to find the exact same question -- Brew - reinstalling python@2. Unfortunately I can't raise the duplicate flag again so I'll duplicate the answer:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/86a44a0a552c673a05f11018459c9f5faae3becc/Formula/python@2.rb
Related