Prepend the url prefix git+ (See VCS Support):

Use with AIpip install git+https://github.com/tangentlabs/django-oscar-paypal.git@issue/34/oscar-0.6

And specify the branch name without the leading /.

Answer from falsetru on Stack Overflow
🌐
Adam Johnson
adamj.eu › tech › 2019 › 03 › 11 › pip-install-from-a-git-repository
'pip install' From a Git Repository - Adam Johnson
If the package is pure Python or has a relatively simple build process, you can normally install it directly via Git. Pip can speak git to do this through its Version Control System (VCS) Support.
🌐
PyPI
pypi.org › project › python-git
python-git · PyPI
You can get a portable git version from here · Just unzip it and place it somewhere on your disk. Later (during initialization), you'll need to tell python-git where this file is located. pip install python-git ·
🌐
pip
pip.pypa.io › en › stable › cli › pip_install
pip install - pip documentation v26.3
Install the packages (and uninstall anything being upgraded/replaced). Note that pip install prefers to leave the installed version as-is unless --upgrade is specified.
🌐
GeeksforGeeks
geeksforgeeks.org › git › how-to-pip-install-from-a-git-repo-branch
How to Pip Install From a Git Repo Branch? - GeeksforGeeks
July 23, 2025 - Sometimes you want to use the features ... software, we have to pip-install the software which means installing a Python package from a specific branch of a Git repository....
🌐
Python Assets
pythonassets.com › posts › how-to-pip-install-from-a-git-repository
How to `pip install` From a Git Repository | Python Assets
March 8, 2023 - For example, to install the Requests module from its GitHub repository: pip install git+https://github.com/psf/requests.git
🌐
Stack Abuse
stackabuse.com › bytes › installing-python-packages-from-a-git-repo-with-pip
Installing Python Packages from a Git Repo with pip
August 28, 2023 - If the Git repository you want to install from is private, you'll need to provide your Git credentials in the URL. Here's how you can do it: $ pip install git+https://username:[email protected]/username/repository.git
Find elsewhere
🌐
PyPI
pypi.org › project › GitPython
GitPython · PyPI
Or use this gh command (assuming you have gh and your fork is called GitPython): ... Having cloned the repo, create and activate your virtual environment. ... In the less common case that you do not want to install test dependencies, pip install -e .
🌐
GitHub
gist.github.com › javrasya › e95ade856ff42e4649972f8a54368459
pip-install-from-a-git-repo.md · GitHub
#For Local Git Repository pip install git+file///path/to/your/git/project/ #Example: pip install git+file:///Users/ahmetdal/workspace/celery/
🌐
DEV Community
dev.to › fronkan › pip-install-a-git-repository-111b
Pip Install a Git Repository - DEV Community
July 19, 2022 - You can use pip to install directly from a git repository. To install flask the shortest version of the command is pip install git+https://github.com/pallets/flask.git. This will install whatever is on the default branch of the project.
🌐
Squash
squash.io › how-to-pip-install-from-a-git-repo-branch
How to Pip Install From a Git Repo Branch - Squash Labs
November 2, 2023 - Using a virtual environment ensures that the installed package and its dependencies are isolated from the system-wide Python installation. As an alternative, you can directly specify the Git repository URL in the pip install command without cloning the repository manually.
🌐
Matias Codesal
matiascodesal.com › posts › how-use-git-repository-pip-dependency
How to Use a Git Repository as a Pip Dependency
June 8, 2020 - # You'll want to do something in the form of pip install git+<repository_url> # For example pip install git+https://github.com/matiascodesal/git-for-pip-example.git # Check that it worked python -c "import greetings;greetings.hello()"
🌐
Medium
allwin-raju.medium.com › how-to-install-python-packages-from-github-using-pip-54dd6a2f7f0f
How to Install Python Packages from GitHub Using pip | by Allwin Raju | Medium
December 11, 2024 - To install a Python package from a public GitHub repository, use the following command: pip install git+https://github.com/<username>/<repository>.git
🌐
Calmcode
calmcode.io › til › pip-git-install
TIL: Pip install via Git
Just host the full Python project as you would normally but now point to the git URL instead. Then you can install it via: python -m pip install "<name> @ git+https://github.com/koaning/<name>.git"
🌐
Fir3net
fir3net.com › home › how to install a git repo using pip
How to install a Git Repo using Pip - Fir3net
July 31, 2021 - pip install -e git+https://github.com/felix001/commontools.git#egg=commontools
🌐
Codegive
codegive.com › blog › pip_install_from_git.php
Pip install from git
Instead of looking for the package on PyPI, pip uses the Git client installed on your system to clone the specified repository, locate the setup.py or pyproject.toml file, and then install the package content. The core mechanism involves prefixing the repository URL with git+. For instance, ...
🌐
Hashnode
fronkan.hashnode.dev › fredrik sjöstrand › #python › pip install a git repository
Pip Install a Git Repository - Fredrik Sjöstrand
October 22, 2020 - You can use pip to install directly from a git repository. To install flask the shortest version of the command is pip install git+https://github.com/pallets/flask.git. This will install whatever is on the default branch of the project.