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 /.
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 /.
Using pip with git+ to clone a repository can be extremely slow (test with https://github.com/django/django@stable/1.6.x for example, it will take a few minutes). The fastest thing I've found, which works with GitHub and BitBucket, is:
Use with AIpip install https://github.com/user/repository/archive/branch.zip
which becomes for Django master:
Use with AIpip install https://github.com/django/django/archive/master.zip
for Django stable/1.7.x:
Use with AIpip install https://github.com/django/django/archive/stable/1.7.x.zip
With BitBucket it's about the same predictable pattern:
Use with AIpip install https://bitbucket.org/izi/django-admin-tools/get/default.zip
Here, the master branch is generally named default.
This will make your requirements.txt installing much faster.
Some other answers mention variations required when placing the package to be installed into your requirements.txt. Note that with this archive syntax, the leading -e and trailing #egg=blah-blah are not required, and you can just simply paste the URL, so your requirements.txt looks like:
Use with AIhttps://github.com/user/repository/archive/branch.zip
You need the whole python package, with a setup.py file in it.
A package named foo would be:
foo # the installable package
├── foo
│ ├── __init__.py
│ └── bar.py
└── setup.py
And install from github like:
$ pip install git+ssh://[email protected]/myuser/foo.git
or
$ pip install git+https://github.com/myuser/foo.git@v123
or
$ pip install git+https://github.com/myuser/foo.git@newbranch
More info at https://pip.pypa.io/en/stable/cli/pip_install/
I had similar issue when I had to install from github repo, but did not want to install git , etc.
The simple way to do it is using zip archive of the package. Add /zipball/master to the repo URL:
$ pip install https://github.com/hmarr/django-debug-toolbar-mongo/zipball/master
Downloading/unpacking https://github.com/hmarr/django-debug-toolbar-mongo/zipball/master
Downloading master
Running setup.py egg_info for package from https://github.com/hmarr/django-debug-toolbar-mongo/zipball/master
Installing collected packages: django-debug-toolbar-mongo
Running setup.py install for django-debug-toolbar-mongo
Successfully installed django-debug-toolbar-mongo
Cleaning up...
This way you will make pip work with github source repositories.