26

I have across a very weird issue. I try to pip install a package from my github fork. I have done this multiple times in the past and it works always.

This is what I do:

pip install git+https...@my_branch

While this works perfectly in my local machine, when I try to w Windows Remote machine and to my Ubuntu Vagrant box it doesnt work.

Instead of installing the package with my_branch, it installs the master branch. Initially I thought it was related with an outdated version of pip but after upgrading to the latest version, I keep facing the same issue.

Any ideas whats the problem?

1

3 Answers 3

17

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"

Sign up to request clarification or add additional context in comments.

Comments

8

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

Comments

5

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.