title: how to require a specific package version in tox?
body: <p>In my <code>tox.ini</code> file, the dependencies are installed via the <code>requirements.txt</code> file which is also used by <code>setup.py</code>, as follows:</p>
  
  <p>The <code>requirements.txt</code> file contains the acceptable range of <code>django</code> packages, depending on the python version installed, as follows:</p>
  
  <pre><code>Django&gt;=1.11,&lt;2 ; python_version == '2.7'
  Django&gt;=1.11,&lt;3 ; python_version &gt; '3'
  </code></pre>
  
  <p>For python3, I want to make sure the tests run on <code>django 2.0</code> as well as the latest <code>django 2.1+</code> that will be installed by default, obeying the version constraints specified in the <code>requirements.txt</code> file. To achieve that, I force the installation of the desired django version with commands, as follows:</p>
  
  <pre><code>[tox]
  envlist = {py27,py3}-django111,py3-django{20,21}
  
  [testenv]
  deps =
      -r{toxinidir}/requirements.txt
  
  commands =
      django111: pip install 'Django&gt;=1.11,&lt;1.12'
      py3-django20: pip install 'Django&gt;=2.0,&lt;2.1'
      py3-django21: pip install 'Django&gt;=2.1'
      pytest
  </code></pre>
  
  <p>Ideally I could just add to the <code>deps</code> variable like so:</p>
  
  <pre><code>[testenv]
  deps =
      -r{toxinidir}/requirements.txt
      django111: Django&gt;=1.11,&lt;1.12
      py3-django20: Django&gt;=2.0,&lt;2.1
      py3-django21: Django&gt;=2.1
  
  commands =
      pytest
  </code></pre>
  
  <p>But <code>pip</code> does <a href="https://github.com/pypa/pip/issues/988" rel="nofollow noreferrer">not support double requirements and will throw an error</a> even though there is no conflict in how the version constraints are specified.</p>
  
  <p>The drawback of using <code>commands</code> to override the installation is that it needs to remove the <code>django</code> package version installed via <code>requirements.txt</code> to install the desired one. Is there a way to avoid that extra step?</p>