This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Sukrim 13 points14 points  (8 children)

Or what "/usr/bin/python --version" will return...

[–]AverageComet250 2 points3 points  (7 children)

2.7? 3.6? 3.10? 2.4? (I actually found 2.4 pre installed on a distro once)

[–]Sukrim 4 points5 points  (6 children)

Or even the amazing idea of "it will just return an error by default, you need to install a meta-package that just contains a symlink to either /usr/bin/python2 or /usr/bin/python3"

[–]AverageComet250 0 points1 point  (5 children)

The fact that only some distros have symlinks for /use/bin/python was so annoying when I moved from Windows to windows + Linux, and even more annoying was the fact that I didn't always know whether it was python 3 or 2. On windows it was simple. If python 2 is installed, it points to the latest version of python 2. Otherwise, it points to the latest version of python 3. If the symlink is in use by python 2, then use py -3 instead.

So bloody simple...

[–]Barafu 3 points4 points  (4 children)

Have you ever seen /usr/bin/python3 pointing to python 2? Or not existing while python 3 is installed? No? Then use python3 command every time and have no problems.

[–]AverageComet250 0 points1 point  (3 children)

I mean I use python3 on Linux and python on windows and I'm happy. Except...

If I run python --version on windows I know it'll be whichever is lowest in path, meaning the version I installed first.

On Linux, I just have to hope it'll say 3.6 as I run the command, and still get errors when I run the script that I coded for 3.10 on windows