Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between homebrew python and caskroom python?

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?

like image 522
todd_dsm Avatar asked Feb 09 '23 11:02

todd_dsm


1 Answers

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.

like image 178
Jörn Hees Avatar answered Feb 12 '23 01:02

Jörn Hees