【问题标题】:How to install pull request using pip?如何使用 pip 安装拉取请求?
【发布时间】:2019-02-11 18:47:01
【问题描述】:

不知道如何安装这个拉取请求:

https://github.com/shamanu4/dal_admin_filters/pull/23

我试图找到最后一次提交:

https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b

然后运行:

pip install git+https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b

但它会返回:

Collecting git+https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b
  Cloning https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b to /tmp/pip-req-build-3uyhi6ui
fatal: repository 'https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b/' not found
Command "git clone -q https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b /tmp/pip-req-build-3uyhi6ui" failed with error code 128 in None

如何让它发挥作用?我需要对我的 Django 项目进行修复。

【问题讨论】:

标签: python git github pip pull-request


【解决方案1】:

提交没有推送到主控中。

➜  dal_admin_filters git:(master) git checkout 43f33db7c57058613a5410776575ce5f0f78357b
fatal: reference is not a tree: 43f33db7c57058613a5410776575ce5f0f78357b
➜  dal_admin_filters git:(master)

您应该按照here 所述的步骤进行操作。

否则,我认为您可以简单地在本地编辑文件。 There aren't much changes

否则,您可以创建自己的 git 存储库,克隆该存储库并包含来自 __init__.py 的更改。但是,在这种情况下,您无法跟踪提交给 repo 的更改。

【讨论】:

  • 问题是我希望它在 requirements.txt 中,这样它就可以自动安装,所以我不喜欢在本地编辑文件。
猜你喜欢
  • 2018-04-22
  • 2021-07-07
  • 1970-01-01
  • 1970-01-01
  • 2016-01-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多