pip: how to install a git pull request
You can add the exact commit to the URL by appending the hash:
pip install git+https://github.com/other-repository/project.git@remote_branch_name
example:pip install --user git+https://github.com/d1b/pip.git@fix_pip_build_directory
Or to a single commit. But this does not get updated, if the pull request (remote branch) gets updated:pip install --user git+https://github.com/d1b/pip.git@d89b5803db2b520e754b9b26b771d22121738637
Installing a pull git request with pip
The pull request is not part of graphql-python/graphene-django
codebase yet; you have to install from the fork jayhale/graphene-django
containing the commits. Choose the hash of the last commit in the pull request (looks like it's eafed16a167ffe8991226f224db33e5c8451a44b
, commit message "Remove unsupported python & Django test cases") to install from:
$ pip install git+https://github.com/jayhale/graphene-django@eafed16a167ffe8991226f224db33e5c8451a44b
How to install an umerged pull request with pip?
The pull request is created from a git branch, so you can install the specific branch by:
pip install -e git://github.com/{ reponame path }.git@{ tag or branch name }#egg={ desired egg name }
in your case:pip install -e git://github.com/hidmic/deap.git@py3#egg=deap
pip install from git repo branch
Prepend the url prefix git+
(See VCS Support):
pip install git+https://github.com/tangentlabs/django-oscar-paypal.git@issue/34/oscar-0.6
And specify the branch name without the leading /
. Is it possible to use pip to install a package from a private GitHub repository?
You can use the git+ssh
URI scheme, but you must set a username. Notice the git@
part in the URI:
pip install git+ssh://git@github.com/echweb/echweb-utils.git
Also read about deploy keys.PS: In my installation, the "git+ssh" URI scheme works only with "editable" requirements:
pip install -e URI#egg=EggName
Remember: Change the :
character that git remote -v
prints to a /
character before using the remote's address in the pip
command:$ git remote -v
origin git@github.com:echweb/echweb-utils.git (fetch)
# ^ change this to a '/' character
If you forget, you will get this error:ssh: Could not resolve hostname github.com:echweb:
nodename nor servname provided, or not known
Install specific git commit with pip
You can specify commit hash, branch name, tag.
For the branch name and the tag, you can also install a compressed distribution. This is faster and more efficient, as it does not require cloning the entire repository. GitHub creates those bundles automatically.
hash:
$ pip install git+https://github.com/aladagemre/django-notification.git@2927346f4c513a217ac8ad076e494dd1adbf70e1
branch-nameWith git
$ pip install git+https://github.com/aladagemre/django-notification.git@cool-feature-branch
or from source bundle$ pip install https://github.com/aladagemre/django-notification/archive/cool-feature-branch.tar.gz
tagwith git
$ pip install git+https://github.com/aladagemre/django-notification.git@v2.1.0
or from source bundle$ pip install https://github.com/aladagemre/django-notification/archive/v2.1.0.tar.gz
It is a not well-documented feature, but you can find more information at https://pip.pypa.io/en/latest/topics/vcs-support/
Related Topics
Typeerror: Expected a Character Buffer Object - While Trying to Save Integer to Textfile
How to Read a File Line-By-Line in Python
How to Use Asyncio with Existing Blocking Library
How to Convert an Int to a Hex String
Detect 64Bit Os (Windows) in Python
Why Is True Returned When Checking If an Empty String Is in Another
How May I Override the Compiler (Gcc) Flags That Setup.Py Uses by Default
Why How to Not Create a Wheel in Python
Powersets in Python Using Itertools
Numpy Array Dtype Is Coming as Int32 by Default in a Windows 10 64 Bit MAChine
How to Upsert Pandas Dataframe to Microsoft SQL Server Table
Django: How to Build a Custom Form Widget
Python Wildcard Search in String
Getting Gradient of Model Output W.R.T Weights Using Keras
Count the Number of Occurrences of a Certain Value in a Dictionary in Python