我正在开发一个django应用程序,我正在使用pip来管理我的需求。我怎样才能安装一个特定的git的提交?
在我的例子中,我需要安装这个提交:https://github.com/aladagemre/django-notification/commit/2927346f4c513a217ac8ad076e494dd1adbf70e1
发布于 2016-05-24 03:04:26
只需添加以下行,就可以使用requirements.txt文件在项目上自动安装python包:
package-name -e git+https://github.com/owner/repository.git@branch_or_commit#egg={package-name}
然后运行命令行:
$ pip install -r requirements.txt
发布于 2015-08-13 05:49:14
对@hugo-tavares的回答有一个额外的评论:
如果是私有GitHub存储库,则需要使用:
pip install git+ssh://git@github.com/....
在您的案例中:
pip install git+ssh://git@github.com/aladagemre/django-notification.git@2927346f4c513a217ac8ad076e494dd1adbf70e1
发布于 2017-11-15 06:55:00
如果您想要创建一个egg包,您仍然可以使用相同的@branch_or_commit附件:pip install git+ssh://git@github.com/myrepo.git@mybranch#egg=myeggscript
https://stackoverflow.com/questions/13685920
复制相似问题