Alex Tomkins - Pythonhttps://www.alextomkins.com/2016-09-03T14:32:00+01:00Upgrading packages in all Python virtual environments2016-09-03T14:32:00+01:002016-09-03T14:32:00+01:00Alex Tomkinstag:www.alextomkins.com,2016-09-03:/2016/09/upgrading-packages-in-all-python-virtual-environments/<p>If you're working with a lot of Python virtual environments in a wide variety of
projects, over time you'll end up with outdated packages in some of the older
ones - potentially missing out on new features.</p>
<p>For most of the packages you'll want to keep them at a specific version …</p><p>If you're working with a lot of Python virtual environments in a wide variety of
projects, over time you'll end up with outdated packages in some of the older
ones - potentially missing out on new features.</p>
<p>For most of the packages you'll want to keep them at a specific version for each
virtual environment, however for packages such as <a class="reference external" href="https://pip.pypa.io/en/stable/">pip</a>, you may want to upgrade
it to the latest version in all your local virtual environments. If you're
running <a class="reference external" href="http://virtualenvwrapper.readthedocs.io/">virtualenvwrapper</a>, all you have to do is use the <tt class="docutils literal">allvirtualenv</tt>
command:</p>
<div class="highlight"><pre><span></span><span class="gp">$</span> allvirtualenv pip install --upgrade pip setuptools wheel
</pre></div>
<p>And inside every virtual environment you'll have the latest version of pip and
the other essential package installation tools updated in your virtual
environment.</p>