【问题标题】:How to install a specific git branch with pipenv如何使用 pipenv 安装特定的 git 分支
【发布时间】:2018-10-17 20:09:59
【问题描述】:

如何使用 pipenv 安装特定的 git 分支?我知道这个命令会安装 bitcoinlib master 分支

pipenv install -e git+https://github.com/1200wd/bitcoinlib.git#egg=bitcoinlib

但是我怎样才能安装一个不是 master 的分支呢?

【问题讨论】:

    标签: python git pipenv


    【解决方案1】:

    如果您还使用 master 或其他分支,您只需使用 @ 符号指定分支并将 egg 名称更改为有点不同。遵循这个语法

    pipenv install -e git+<your/target/git/repository/url.git>@branch#egg=package_name
    

    所以在我的示例中,我需要使用 segwit-support 分支

    pipenv install -e git+https://github.com/1200wd/bitcoinlib.git@segwit-support#egg=bitcoinlib_segwitsupport
    

    将这一行添加到我的 pipfile 中

    bitcoinlib_segwit-support = {editable = true, ref = "segwit-support", git = "https://github.com/1200wd/bitcoinlib.git"}
    
    【解决方案2】:

    我认为Post 正是在讨论您的问题。对于特定版本/分支,您需要修改 https url。

    【讨论】:

      猜你喜欢
      • 2017-12-26
      • 1970-01-01
      • 1970-01-01
      • 2017-02-17
      • 2021-12-29
      • 2018-05-02
      • 2017-02-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多