Setting default interpreter for a python script
问题 I am using a module that can only be found in python 2.7, so when I run my script I have to specify python2.7 script instead of just script . I know there are bigger issues out there, but still I was wondering - is it possible, when writing a python script, to set the interpreter to 2.7 by default? Maybe by setting #! /usr/bin/env python for example? 回答1: Most unix environments will have the python2.7 executable, such that you can write: #!/usr/bin/env python2.7 Obviously this doesn't help