Unix & Linux Asked by James Ronald on October 31, 2021
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
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.
Answered by muru on October 31, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP