从git repo分支安装pip

2024-04-25 15:26:16 发布

您现在位置:Python中文网/ 问答频道 /正文

试图pip安装repo的特定分支。谷歌告诉我

pip install git+https://github.com/user/repo.git@branch

分支的名称是issue/34/oscar-0.6,所以我做了pip install https://github.com/tangentlabs/django-oscar-paypal.git@/issue/34/oscar-0.6,但是它返回了404。

如何安装此分支?


Tags: installpipdjangohttpsgitgithub名称com
2条回答

在url前缀前面加上git+(请参见VCS Support):

pip install git+https://github.com/tangentlabs/django-oscar-paypal.git@issue/34/oscar-0.6

并指定不带前导/的分支名称。

使用ssh凭据从私有repo安装的说明:

$ pip install git+ssh://git@github.com/myuser/foo.git@my_version

相关问题 更多 >