5

I want install the specific 3.3 version of python.

I have tried:

brew versions is not longer supported.

brew search python3 does not show python3.X versions.

brew tap homebrew/versions does not work neither.

How can I install python3.3 in macosx using brew and I don't want to use pyenv.

Community
  • 1
  • 1
Ricardo
  • 6,375
  • 11
  • 50
  • 93

1 Answers1

1

According to this answer

First uninstall python3

brew uninstall python3

Download this formula https://gist.github.com/booleangate/8f0bb23fdd53d699f763f0959c506049

Then go to directory where formula was downloaded and intro into terminal

brew install --debug python33.rb

From now on, if you want run this version of python you must type on terminal:

07:03:17 $ python3.3 
Python 3.3.6 (default, Jan 26 2016, 06:48:22) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 2+2                 
4
>>> 3*3==9
True
>>> 

Enjoy!

Justin Johnson
  • 29,495
  • 7
  • 60
  • 86
Ricardo
  • 6,375
  • 11
  • 50
  • 93
  • The gist must be edited to replace the 3 occurrences of `sha1` with `Formula.sha256` or else you get an error. – hepcat72 Jan 30 '17 at 20:35
  • I think it's probably a better option to install the binary directly from https://www.python.org/ftp/python/ . I was able to install python3.5.4 on Mac El Capitan in this way. This way you get python directly from the source, rather than installing software via formulas found on gist. – Cognitiaclaeves Jan 03 '18 at 16:17
  • 1
    The link in the answer is dead. – The Matt Jul 09 '18 at 00:13
  • 2
    @TheMatt I suggest to install pyenv. – Ricardo Jul 09 '18 at 20:47
  • I was going to fix the link but the formula doesn't work anymore anyway. Use pyenv instead. – Justin Johnson Oct 02 '18 at 08:29