Why not use #! /usr/bin/python2.7
when you want to use python 2.7 and #! /usr/bin/python3.4
when you want to use python 3.4?
Alternatively if you want your python programs to automatically use the latest python 2.x or python 3.x, use #!/usr/bin/python2
or #!/usr/bin/python3
- they are symlinks pointing to the latest versions, 2.7 and 3.4 respectively at the moment.
BTW, I have the following python interpreters installed on my debian sid
system at the moment. They all work as expected.
lrwxrwxrwx 1 root root 9 Mar 17 2015 /usr/bin/python -> python2.7*
lrwxrwxrwx 1 root root 9 Mar 17 2015 /usr/bin/python2 -> python2.7*
-rwxr-xr-x 1 root root 2652824 May 9 2013 /usr/bin/python2.6*
-rwxr-xr-x 1 root root 3500648 Sep 14 11:04 /usr/bin/python2.7*
lrwxrwxrwx 1 root root 9 Jun 28 09:42 /usr/bin/python3 -> python3.4*
-rwxr-xr-x 1 root root 2965608 Nov 28 2010 /usr/bin/python3.1*
lrwxrwxrwx 1 root root 11 May 9 2013 /usr/bin/python3.2 -> python3.2mu*
-rwxr-xr-x 1 root root 2890040 May 9 2013 /usr/bin/python3.2mu*
-rwxr-xr-x 2 root root 4148216 Sep 24 11:22 /usr/bin/python3.4*
-rwxr-xr-x 2 root root 4148216 Sep 24 11:22 /usr/bin/python3.4m*
lrwxrwxrwx 1 root root 10 Jun 28 09:42 /usr/bin/python3m -> python3.4m*