pip install from git repo branch

前端 未结 6 2250
醉酒成梦
醉酒成梦 2020-11-22 02:58

Trying to pip install a repo\'s specific branch. Google tells me to

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

The

6条回答
  •  时光说笑
    2020-11-22 03:31

    You used the egg files install procedure. This procedure supports installing over git, git+http, git+https, git+ssh, git+git and git+file. Some of these are mentioned.

    It's good you can use branches, tags, or hashes to install.

    @Steve_K noted it can be slow to install with "git+" and proposed installing via zip file:

    pip install https://github.com/user/repository/archive/branch.zip
    

    Alternatively, I suggest you may install using the .whl file if this exists.

    pip install https://github.com/user/repository/archive/branch.whl
    

    It's pretty new format, newer than egg files. It requires wheel and setuptools>=0.8 packages. You can find more in here.

提交回复
热议问题