Python/pip,如何从 github 安装特定版本的 git 存储库(正确的 url 是什么)?

标签 python django git github

我想通过 pip 安装 Django 1.7。它目前是一个开发版本,所以不在 pips 存储库中。

所以我在使用之前已经从github安装了包:

pip install git+[url here]

现在查看 github,我在 django 页面上获得了克隆 url:

https://github.com/django/django.git

但这并没有提到分支。如何指定我想要 1.7 版? 它在 github 页面上的某个地方很明显吗?

最佳答案

在 url 末尾的 @ 之后指定branchcommit hashtag name :

pip install git+https://github.com/django/django.git@1.7b3

这将安装 version tagged with 1.7b3 .

引用:https://pip.pypa.io/en/latest/cli/pip_install/

关于Python/pip,如何从 github 安装特定版本的 git 存储库(正确的 url 是什么)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23521345/

相关文章:

python - 弃用警告 : invalid escape sequence - what to use instead of\d?

python - Django 持久数据库连接 - 一种不同的方法

python - 未知命令 : 'clearsessions'

Git + 大数据集?

python - 无法添加边缘检测 - Raspberry Pi 3 GPIO

python - 从字符串数组中删除 nan

android - Gitignore 不会忽略 Android 库中的一些构建文件

git - 如何在服务器端 git hook 中获取推送用户信息?

Python - 由于导入错误导致 Modelica 连接失败

python - Django.rest_framework : How to serialize one to many to many?