Skip to content

Comment on Ubuntu announces 12.10 (Quantal Quetzal) Beta 1parent

Comments

which btw wouldn't help at all with op's scenario of Python 2 scripts finding an unexpected Python 3 interpreter.

Exactly. Whenever a script is made, it should have #!/usr/bin/env interpreter# as the first line.

#!/usr/bin/env python2 #!/usr/bin/env python3

Explicitly declaring the required version fixes that problem. In arch, most of the PKGBUILDs will have a line to sed the explicit line into the file in place of the generic python line.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.