I'm using virtualenv to develop a django application with a team. The server we're deploying on is running python 2.6, but the default for our machines is 2.7.3. Is there any way to specify python version in the requirements.txt file, or something similar, within the code base?
I know requirements.txt is a pip thing, and python version is a virtualenv thing, but it would be really convenient not to have to tell every new person joining the team how to set up their virtualenv.
Neither pip nor virtualenv install python (though pip tries). They use whatever you specify.
You could write a README that mentions required Python version or provide a fabric script that can deploy to localhost and specify the version there. For example, instructions to install virtualenv, pip, distribute.
For those people who don't read instructions there could be a CI system (jenkins, buildbot) that can run unit-tests using supported python versions (before/after commit).
To manage multiple python installation you could use something like pythonz.
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