4

The page Installing Python on Mac OS X suggests that the OS X version is OK for learning but not great for writing real programs; solution - install from Homebrew.

I don't think the caskroom existed when they wrote this page though. Basically, I just want to install the most optimal version for doing Python programming.

When I do a search I get this output:

$ brew search python
boost-python   gst-python     python         python3        wxpython       zpython
Caskroom/cask/mod_python      homebrew/python/vpython           Caskroom/cask/python
homebrew/python/python-dbus   homebrew/versions/gst-python010   Caskroom/cask/python3

This is what homebrew reports:

macosx-10-9:~ vagrant$ brew cask info python
python: 2.7.9
Python
https://www.python.org/
Not installed
https://github.com/caskroom/homebrew-cask/blob/master/Casks/python.rb
==> Contents
  python-2.7.9-macosx10.6.pkg (pkg)

macosx-10-9:~ vagrant$ brew info python
python: stable 2.7.10 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org
/usr/local/Cellar/python/2.7.10_2 (4906 files, 77M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/python.rb

So, what's the effective difference between these two packages?

todd_dsm
  • 918
  • 1
  • 14
  • 21
  • From http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac "Homebrew Cask is an extension for Homebrew that allows you to automate the installation of Mac Apps and Fonts". I recommend using Continuum's Anaconda distribution on OS X, Linux and Mac, see http://docs.continuum.io/anaconda/install. –  Jul 26 '15 at 17:35

1 Answers1

8

Caskroom python installs the Python Mac OS X packages from https://www.python.org/downloads/mac-osx/ as they are provided there.

brew install python will install from source and under /usr/local/Cellar/python/... and properly symlink /usr/local/bin/python.

The latter is the "proper homebrew approach" (TM) and will allow updates with brew upgrade.

Jörn Hees
  • 3,338
  • 22
  • 44