In my requirements.txt
file I want to specify that my app needs Django version 1.3.x. That is, either 1.3.0, or 1.3.1, or 1.3.2, etc. (When these come out.) But not 1.4, when it comes out.
What's the syntax for this?
To install a specific version of a Python package you can use pip: pip install YourPackage==YourVersion . For example, if you want to install an older version of Pandas you can do as follows: pip install pandas==1.1. 3 .
Once pip has a list of compatible distributions, it sorts them by version, chooses the most recent version, and then chooses the "best" distribution for that version. It prefers binary wheels if there are any, and if they are multiple it chooses the one most specific to the install environment.
You can use pip install --upgrade SomePackage to upgrade to a newer version, or pip install SomePackage==1.0.
this will automatically upgrade all packages from requirements. txt (make sure to install pip-tools using pip install command). Pip-tools is working great -- updated syntax is pip-compile -U requirements. txt .
According to Ian Bicking:
Django>=1.3,<1.4
However, it's apparently safer to do:
Django>=1.3,<1.3.99
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With