I develop a Python/Django application, which runs from a virtual environment (created by virtualenv
).
When the virtual environment is created, the global version of pip
is copied to the newly created environment by default, which might be quite outdated (for example, version 1.5.4
from python-pip
package on Ubuntu 14.04).
To avoid manual pip
upgrades, it sounds like a good idea to pin the pip
version in requirements.txt
file, for instance by adding the following line:
pip==8.1.2
Specifying the pip
version there will also allow to upgrade pip
in all the managed application environments (local, dev, production) by changing the line in the requirements file.
Does this sound like a good practice? Is there anything that can go wrong with this approach?