You can also install the python2.7 package. Then you can determine the python version with shebang ( #!/usr/bin/env python2.7
) or even use #update-alternatives --config python
to make it the default interpreter. But it can break a lot of system applications ...
update: sometimes there is no alternative to python, so you will need to create them manually. Something like update-alternatives --install /usr/bin/python python2.7 /usr/bin/python2.7 10
update2: however, if you only need 2.7 for your project, I would suggest using virtualenv: virtualenv -ppython2.7 myproject
source share