使用安装Python 2.7.9而不是最新的2.7.10的情况,之前我可以brew versions python通过brew中的提交SHA 简单地使用和查看所有Python公式版本,然后检查它们以安装特定版本.这是brew versions python输出的一个例子:
$ brew versions python
Warning: brew-versions is unsupported and will be removed soon.
You should use the homebrew-versions tap instead:
https://github.com/Homebrew/homebrew-versions
2.7.9 git checkout 667284f /usr/local/Library/Formula/python.rb
2.7.8 git checkout f26ca5c /usr/local/Library/Formula/python.rb
2.7.7 git checkout d48206e /usr/local/Library/Formula/python.rb
2.7.6 git checkout 3c64184 /usr/local/Library/Formula/python.rb
2.7.5 git checkout a04b443 /usr/local/Library/Formula/python.rb
2.7.3 git checkout 865f763 /usr/local/Library/Formula/python.rb
2.7.4 git checkout 280581d /usr/local/Library/Formula/python.rb
2.7.2 git checkout 97c6869 /usr/local/Library/Formula/python.rb
2.7.1 git checkout 83ed494 /usr/local/Library/Formula/python.rb
2.7 git checkout …Run Code Online (Sandbox Code Playgroud) 我想从 github 项目安装一些包,其中一个依赖项是python@2.
在 2020 年 1 月 1 日之前,可以python@2使用 Homebrew进行安装:
$ brew install python@2
Run Code Online (Sandbox Code Playgroud)
但是,Python 2 支持已从 Homebrew 终止。python@2既然 Python 2 支持已经结束,那么无论如何要在 Mac上安装?
在这个项目中的代码被移植到 Python 3 之前,不幸的是我一直坚持让它与 Python 2(以及使用 Python 2 的依赖项)一起工作,这就是我想python@2作为临时解决方案安装的原因。