Homebrew Python



Homebrew Python

About this project This Homebrew tap provides formulae to install multiple Python versions. Homebrew’s Python is not for you. It exists to serve Homebrew, or more accurately, Homebrew’s other formulae. The primary purpose of Homebrew’s Python formula is to enable other Python-dependent Homebrew packages to work. If installing Homebrew’s Python allows you to run the occasional Python script or access the REPL.

Today I’d like to announce Homebrew 1.5.0. The most significant changes since 1.4.0 are deprecations of formula APIs and some Homebrew organisation formula taps.

Future dates for your calendar:

  • On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases. Any formulae that use depends_on 'python' outside Homebrew/core will need to be updated at this point if they wish to keep using Python 2. Note: macOS has provided Python 2.7 since OS X Lion (10.7) so you can update formulae that need Python 2 today by removing depends_on 'python' so they use the system python instead.
  • By 31st March 2018 we will deprecate and archive the Homebrew/php tap. Unfortunately we have been unable to maintain an acceptable, consistent user or contributor experience and CI workload through non-core formula taps in the Homebrew organisation so we are continuing to migrate widely used formulae into Homebrew/core and encourage more niche formulae and options to be supported outside the Homebrew organisation.

Major changes and deprecations since 1.4.0:

  • The Homebrew/science tap has been archived (for the reasons explained above) as noted previously. This does not represent an adversarial relationship between Homebrew and the science community (as we have imported the widely used formulae from this tap) but an inability to maintain an acceptable level of quality in this tap and differences of opinion on contributor experience (this tap aimed to work on Homebrew and Linuxbrew which made contribution difficult).
  • brew postgresql-upgrade-database is a new command to simplify upgrading PostgreSQL databases between major versions.
  • Various, old deprecated APIs have been disabled and more deprecations added.

Other changes since 1.4.0 I’d like to highlight are the following:

Finally:

  • Homebrew has fewer maintainers than we once did so we’d love more help. If you’re interested check out the documented expectations for Homebrew maintainers.
  • Homebrew still accepts donations through Patreon. If you can afford it, please consider donating. If you’d rather not use Patreon we’ve updated the README on how to make single donations through PayPal, cheque or wire transfer.

Thanks to all our hard-working maintainers, contributors, sponsors and supporters for getting us this far. Enjoy using Homebrew!

tldr; install brew; brew install python

Homebrew is a great installer for Mac and its main job is to make it easier to install packages.

Step 1: Download Homebrew here

'brew' hosts its package information here as “formulae“.

Step 2: Use brew to install the latest version of Python

$ brew install python --verbose

Now you can run python3 in your terminal

> python3

More details: So what happens when I run brew install?

Homebrew Python 2

When you run the command, brew will look for the package in the “formulae” list and run the installation script for the package.

Brew installs *all* packages into its own directory on your computer at /usr/local/Cellar .

Take a look with $ ls /usr/local/Cellar.

Homebrew Python 3.7

After installation, brew creates a symlink which is basically a shortcut that will allow your system to run the new command > python3.