Index ¦ Archives ¦ Atom

Upgrading packages in all Python virtual environments

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.

For most of the packages you'll want to keep them at a specific version for each virtual environment, however for packages such as pip, you may want to upgrade it to the latest version in all your local virtual environments. If you're running virtualenvwrapper, all you have to do is use the allvirtualenv command:

$ allvirtualenv pip install --upgrade pip setuptools wheel

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.

© Alex Tomkins.