On 9/19/22 18:52, Roger Oberholtzer wrote:
I see that on a newly installed Tumbleweed, only Python 3.10 is installed. No problem with that.
However, there is no executable called 'python'. Only 'python3' and 'python3.10'.
Is this a general thing? That perhaps 'python' always references Python 2?
On openSUSE we have made the decision that /usr/bin/python will always be python 2, changing the shebang to /usr/bin/python3 provides a clear sign that the code has been ported. In the world outside openSUSE some distro's have done what we have and chosen to keep it as python 2 only while on others it changed to pointing to python3 when they made it there default.
Would something break if I made a 'python' link to 'python3'? Obviously, the code called would need to expect it. And I can make sure that's the case for our code. But generally in Tumbleweed/Leap would this confuse something?
If you uninstall and taboo the python2 package then this shouldn't cause issues with openSUSE packages, there is a very limited set of programs in the distro still using any bits of python2 and mostly they are related to building so its likely you can now remove python 2. If you were using an obs instance then obs will automatically add a python2 dependency for any package that it finds a script with #!/usr/bin/python As I said before third party stuff varies on what it expects /usr/bin/python to be but in general its best practice to put either #!/usr/bin/python2 or #!/usr/bin/python3 in your scripts depending on which you actually use. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B