0

For example, when I type python it runs python2 because for me, /usr/bin/python is linked to /usr/bin/python2.7

But does this affect programs? If there are programs on my system that need python 2, and I change /usr/bin/python to be linked to python 3 instead of 2, would those programs break?

Or do programs not use things in /usr/bin? I would expect that they don't, since /usr/bin seems to be meant just for user commands, but I want to be sure

1

If there are programs that need Python 2, they should be explicitly using /usr/bin/python2 (or similar) instead of the plain /usr/bin/python. However, there might be some that haven't been updated, and still use /usr/bin/python. Those could very well break.

If you're on Ubuntu 20.04 or newer, the python-is-python3 explicitly makes /usr/bin/python be Python 3. On older releases, I wouldn't recommend changing that symlink.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.