Install package with pip from specific branch of github

Maybe some characters like the @ character are not recognized properly in your command in other environments? Try putting quotes, like this: pip install "git+https...@my_branch"


Suppose you have forked some git repo and made some changes. To install this specific branch:

  1. Release a new version from your branch and add a version tag, like v1.0
  2. Run pip install -e git+https://github.com/your_user_name/[email protected]#egg=repo_name in the terminal

Here is how I do it is a private repo and I use the branch name:

pip install "git+ssh://[email protected]/your_repo.git@your_branch_name"

Note for authentication, your password might be a token from github if you have set that up.

Checkout this answer for more ways to pip install: https://stackoverflow.com/a/13754517/5042916

Tags:

Branch

Git

Pip