I have a Python application that depends on several packages. One of those packages, unfortunately, isn't in PyPi so I have to install it directly from the git repo.
I've been trying to add it into my setup.py like so:
setup(
..,
..,
dependency_links = [
'https://github.com/marcuz/libpynexmo.git#egg=nexmomessage'
],
install_requires=[
..,
'nexmomessage'
],
packages=['localpackage']
However it fails: No distributions at all found for nexmomessage
I see where it creates the dependency links list: writing dependency_links to common.egg-info/dependency_links.txt - and when I look at that file the URL is correct.
If I run it at command line: pip install -e git+https://github.com/marcuz/libpynexmo.git#egg=nexmomessage
It installs without an issue.
Thoughts?
As of pip 1.5, dependency links are deprecated. Currently pip can still be forced to be used them with the
--process-dependency-links
flag. You might also have to use--allow-external packagename
or--allow-unverified packagename
, wherepackagename
actually specifies whichever dependency you want to install that's not in an official repositoryNote that since it's deprecated functionality, the
--process-dependency-links
flag will be completely removed soon. I believe the preferred approach is to supply arequirements.txt
file.And as of pip 7 they are enabled again. This means you can now use
dependency_links
using pip:pip install -e /path/to/python/module --process-dependency-links --allow-all-external
If you'r using your distros system pip you might need to upgrade pip:
pip install pip --upgrade
Appears to have happened in pull request #1519