如何从python中的需求安装中包括git branch?

嗨,我需要从git repo的一个分支安装。我想将其包含在requirements.txt中,以便使用命令pip install -r requirements.txt

进行安装

我知道如何从master分支安装(请参阅下面的git ssh条目):

这是我的requirements.txt

networkx==2.4
numpy==1.18.1
opencv-python==4.2.0.32
scipy==1.4.1
git+ssh://git@gitlab.com/project/project-utils.git

如果我想从特定分支安装,即1-fix-test上的ssh://git@gitlab.com/project/project-utils.git

如何在ssh地址中包含分支名称?

dlmqwe_a 回答:如何从python中的需求安装中包括git branch?

根据document,您可以在@之后添加分支名称或提交哈希:

git+ssh://git@gitlab.com/project/project-utils.git@1-fix-test
本文链接:https://www.f2er.com/2494389.html

大家都在问