Specify 'pip' version in requirements.txt
<p>I develop a Python/Django application, which runs from a virtual environment (created by <code>virtualenv</code>). </p>

<p>When the virtual environment is created, the global version of <code>pip</code> is copied to the newly created environment by default, which might be quite outdated (for example, version <code>1.5.4</code> from <code>python-pip</code> package on Ubuntu 14.04).</p>

<p>To avoid manual <code>pip</code> upgrades, it sounds like a good idea to pin the <code>pip</code> version in <code>requirements.txt</code> file, for instance by adding the following line:</p>

<p><code>pip==8.1.2</code></p>

<p>Specifying the <code>pip</code> version there will also allow to upgrade <code>pip</code> in all the managed application environments (local, dev, production) by changing the line in the requirements file. </p>

<p>Does this sound like a good practice? Is there anything that can go wrong with this approach?</p>

<p>What you experience is caused by an old version of <code>python-virtualenv</code> delivered with Ubuntu 14.04. You should remove the Ubuntu package and install via pip: </p>

<pre><code>sudo pip install virtualenv
</code></pre>

<p>Then make sure you have the newest pip installed as well. </p>

<pre><code>sudo pip install -U pip
</code></pre>

<p>And you should get that version installed in new virtual environments.</p>

python pip virtualenv requirements.txt