gpt4 book ai didi

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

转载 作者:IT王子 更新时间:2023-10-29 00:51:42 25 4
gpt4 key购买 nike

我想通过 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com