Specify dependency url in setup.py for modules in PyPI
<p>The questions I've seen here so far deal with the opposite situation, i.e. <a href="https://stackoverflow.com/questions/29295968/how-to-define-dependency-links-in-setup-py-for-installing-modules-which-are-not">providing a link to off-PyPI dependencies</a>. In my case, the dependency is published in PyPI, but the version is not up to my requirements. Here is an excerpt from my <code>setup.py</code></p>

<pre><code>setup(
    ...
    install_requires=["numpy&gt;=1.11.0",
                      "scipy&gt;=0.17.0",
                      "lasagne",
                      "Theano&gt;=0.8.1",
                      "scipy&gt;=0.17.0"],

    dependency_links=["git+https://github.com/Lasagne/Lasagne.git#egg=lasagne"]
)
</code></pre>

<p>I need <code>lasagne</code> to be installed from the link, while <code>pip</code> insists on installing the PyPI version. </p>

<p><strong>Edit</strong>. I've tried doing this</p>

<pre><code>setup(
    ...
    install_requires=["numpy&gt;=1.11.0",
                      "scipy&gt;=0.17.0",
                      "lasagne&gt;=0.2.dev1",
                      "Theano&gt;=0.8.1",
                      "scipy&gt;=0.17.0"],

    dependency_links=[
        "git+https://github.com/Lasagne/Lasagne.git#egg=lasagne-0.2.dev1"]
)
</code></pre>

<p>This results in <code>Could not find a version that satisfies the requirement lasagne&gt;=0.2.dev1</code> </p>

<p><strong>Edit2</strong> </p>

<p>Actually passing the <code>--process-dependency-links</code> flag as shown <a href="https://stackoverflow.com/a/13587734/1005215">here</a> (thanks to  Nehal J. Wani) makes it work. How can I make this flag work by default? I don't want a user to be confused.</p>