我想通过 pip 安装 Django 1.7。它目前是一个开发版本,所以不在 pips 存储库中。
所以我在使用之前已经从github安装了包:
pip install git+[url here]
现在查看 github,我在 django 页面上获得了克隆 url:
https://github.com/django/django.git
但这并没有提到分支。如何指定我想要 1.7 版? 它在 github 页面上的某个地方很明显吗?
最佳答案
在 url 末尾的 @
之后指定branch、commit hash 或tag name :
pip install git+https://github.com/django/django.git@1.7b3
这将安装 version tagged with 1.7b3
.
关于Python/pip,如何从 github 安装特定版本的 git 存储库(正确的 url 是什么)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23521345/