title: How to specify dependencies' version in `pip install` command?
body: <p>I specify installing <code>pytest</code> in Drone pipeline as below:</p>
  
  <pre><code>pip install -q pytest
  </code></pre>
  
  <p>it used to work well until a few days ago when it suddenly showed below error:</p>
  
  <pre><code>+ python -m pytest test/test_dai_adrecogzer.py
  Traceback (most recent call last):
    File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
      "__main__", fname, loader, pkg_name)
    File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
      exec code in run_globals
    File "/usr/local/lib/python2.7/dist-packages/pytest.py", line 14, in &lt;module&gt;
      from _pytest.fixtures import fillfixtures as _fillfuncargs
    File "/usr/local/lib/python2.7/dist-packages/_pytest/fixtures.py", line 16, in &lt;module&gt;
      from more_itertools import flatten
    File "/usr/local/lib/python2.7/dist-packages/more_itertools/__init__.py", line 1, in &lt;module&gt;
      from more_itertools.more import *  # noqa
    File "/usr/local/lib/python2.7/dist-packages/more_itertools/more.py", line 329
      def _collate(*iterables, key=lambda a: a, reverse=False):
                                 ^
  
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Searching around I found a <a href="https://stackoverflow.com/questions/54648246/invalid-syntax-in-more-itertools-when-running-pytest#">recently post SO question</a> that seems to closely link to what I am looking for. The reason seems to be because of recently released version 6.0 of <code>more-itertools</code>. The accepted answer suggests to <code>spin</code> to some specific version of <code>more-itertools</code>:</p>
  
  <pre><code>setuptools.setup(
      setup_requires=['pytest-runner'],
      tests_require=['mock', 'more-itertools&lt;6.0.0', 'pytest'],
      test_suite='tests',
      python_requires='&gt;=2.7',
  )
  </code></pre>
  
  <p>How could I apply this suggestion to my issue? More specifically, how could I specify version <code>&lt;6.0.0</code> of <code>more-itertools</code> when install <code>pytest</code> using <code>pip install -q pytest</code> command?</p>