I got confused in the standard way of writing a shebang for a Python script.
I have a simple python link, which may be Python 2.x or Python 3.x, depending on the system, and this is a problem, as both are incompatible.
As a solution, I am writing a version in my shebang and have something like:
But this seems silly because it will prevent my script from running in any other version 3.x
I noticed that on some systems python2 is associated with the latest version. This helps as I could write simple scripts such as "Hello World" that would not interrupt with each version.
I installed Python 2.6, 2.7, 3.1 and 3.2. Using "python" for shebang does not make sense in terms of portability. Using the exact version makes maintainability difficult. I have a python2 link but not python3
Is there any standard and / or PEP indicating how Python should be installed? And the one that says I'm deploying should have python3 and / or python2 related to the latest version?
python installation shebang
Systematic frank
source share