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
As per your comment, the only issue here should be making sure no 2.7-only code makes it into your code base. For that I recommend using tox, and having it configured to create a 2.6
environment to test on, so that when your coworkers run your test suite, the tests are run in a 2.6
virtual environment.
You can also specify the default Python by this command:
sudo update-alternatives --set python /usr/bin/python3.7
it would be really convenient not to have to tell every new person joining the team how to set up their virtualenv
Just add it to the normal set of instructions you give new members when the join; right in the same place when you tell them about the internal documentation wiki, the password to the wifi and the phone number to the sandwich delivery shop.
It will be extremely uncovenient to not have to tell people and have them figure it out themselves; the first time they submit something that uses collections.Counter
only to find out it broke the build because the server doesn't have 2.7.x
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.