5 ms·
I wonder if this will cause much strife. I run ArchLinux, for which the default /usr/bin/python is Python 3. Often I run into issues with (admittedly software n
by pserwylo 14y ago
I wonder if this will cause much strife. I run ArchLinux, for which the default /usr/bin/python is Python 3. Often I run into issues with (admittedly software not from the repos) which uses the
#!/usr/bin/python
shebang, and expects it to reference Python 2, thus causing breakage.
- takluyver 14y agoUbuntu won't be changing that - /usr/bin/python will still mean Python 2. It just won't be installed by default (if they meet their goal, which looks doubtful for this cycle).
- h00k 14y agoThere's always: #!/usr/bin/env python too
- deleted 14y ago[deleted]
- pilif 14y agowhich btw wouldn't help at all with op's scenario of Python 2 scripts finding an unexpected Python 3 interpreter.
- nnnnni 14y agoExactly. 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.
- sp332 14y agoInteresting, that's not recommended by python devs. Ubuntu follows the guideline of keeping /usr/bin/python as Python 2 (which will not be installed by default), and /usr/bin/python3 as Python 3. ETA: Arch Linux actually did this before there was an "official" guideline. http://www.wefearchange.org/2012/04/python-3-on-desktop-for-quantal-quetzal.html?showComment=1335336249282#c9154481091356172027 http://www.wefearchange.org/2012/04/python-3-on-desktop-for-...
- pserwylo 14y agoI guess the reason that I like Arch (new software releases quickly) also caused them to beat the official guideline here :) Thanks for the pointer.