Prevent Travis Python environment from pre-installing packages
<p>Is there a way to prevent the Travis Python environment from pre-installing <code>pytest</code>, <code>nose</code>, <code>mock</code> etc.? The versions are old and causing order-dependent problems when upgrading. I want to specify my dependencies only in <code>setup.py</code>, but <code>pytest</code> and <code>py</code> require mutual upgrades, which seems to always fail.</p>

<p>I see there is a <code>virtualenv</code> key for <code>.travis.yml</code> which is sometimes mentioned briefly, but I don't see proper documentation for it.</p>

<p>I didn't find a way to do this, but I found a relatively clean workaround: <code>virtualenvwrapper.sh</code> has a <code>wipeenv</code> command I did not previously know. So now I setup a "modern and clean" virtualenv like this:</p>

<pre><code>before_install:
  - pip install -U pip setuptools virtualenvwrapper
  - source $(which virtualenvwrapper.sh)
  - wipeenv
</code></pre>

<p>I don't have to worry about the exact list of packages or intersection of them with my own, and the <code>install</code>/<code>script</code> sections can proceed unhindered by whatever Travis setup for me.</p>

python pip travis-ci setup.py