The brew versions
command has been removed. The instructions are no longer valid.
Make sure you don't have any Python 3.x installed:
$ brew uninstall python3
Then cd
into your brew directory, this is /usr/local
normally:
$ cd /usr/local
Then list all the available Python 3.x versions in Homebrew:
$ brew versions python3
Sorry, not available with Homebrew.
$ git checkout 0476235 Library/Formula/python3.rb
$ brew install python3
$ brew unlink python3
$ ln -s ../Cellar/python3/3.1.3/bin/python3.1 bin/python3.1
$ git checkout f33f3ea Library/Formula/python3.rb
This formula requires X11, but if you don't have/want it, do not dispair. In Library/Formula/python3.rb
on line 44, remove this line:
depends_on :x11 # tk.h includes X11/Xlib.h and X11/X.h
Also, sqlite didn't work on my machine, so replace this line:
depends_on 'sqlite' => :optional # Prefer over OS X's older version
By this:
depends_on 'sqlite' => :build
Then install as usual:
$ brew install python3
$ brew unlink python3
$ ln -s ../Cellar/python3/3.2.3/bin/python3.2 bin/python3.2
$ git checkout fedb343 Library/Formula/python3.rb
$ brew install python3
$ brew unlink python3
$ ln -s ../Cellar/python3/3.3.5/bin/python3.3 bin/python3.3
$ git checkout HEAD Library/Formula/python3.rb
$ brew install python3