Make Python 2.6 more accessible & the default Python version on Chopin

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Problem: the shebang line "#!/usr/bin/env python" used to invoke Python 2.6; on Chopin (and perhaps other hosts), it now invokes Python 2.4, which causes scripts to fail due to incompatible differences between 2.4 and 2.6. Additionally, the shebang line "#!/usr/bin/env python2.6" no longer works.

Cause: currently, the default python version (/usr/bin/python) on Chopin is Python 2.4.3. Python 2.5 and 2.6 are installed in /usr/local/bin, but that directory is not in the search path ($PATH environment variable) for CGI scripts. It's still possible to use Python 2.5 and 2.6 (with a shebang line of "#!/usr/local/bin/python2.6", for example), but scripts that previously worked now fail, due to the change in default python version.

Requested resolution:
  • Make python2.5 and python2.6 accessible via the search path by either adding /usr/local/bin to $PATH for CGI scripts or by symlinking each /usr/local/bin/python2.[56] to /usr/bin/python2.[56]
  • Make python2.6 the default by symlinking /usr/bin/python to /usr/local/bin/python2.6
 
Top