Brew - 安装 python3.3

Brew - Install python3.3

我想安装特定的 3.3 版本 python。

我试过:

brew versions 不再受支持。

brew search python3 不显示 python3.X 版本。

brew tap homebrew/versions 也不行。

如何使用 brew 在 macosx 中安装 python3.3 而我不想使用 pyenv.

据此answer

先卸载python3

brew uninstall python3

下载这个公式 https://gist.github.com/booleangate/8f0bb23fdd53d699f763f0959c506049

然后转到下载公式的目录并进入终端

brew install --debug python33.rb

从现在开始,如果你想要运行这个版本的python,你必须在终端上输入:

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
>>> 

尽情享受吧!