May-30-2022, 03:31 PM
(May-30-2022, 07:40 AM)Pavel_47 Wrote:Quote:Never change the system python.What do you mean by "system python" ?
Whatever /usr/bin/python or /usr/bin/python3 points to. It's likely that system components refer to that path and may not be able to cope with changes.
You should be able to add a new python without modifying /usr/bin/python*.
Quote:It's installed alongside: I can point python3 either to 3.6.9 either to 3.10.
When python3 points to 3.10, I can't use gnome-terminal which I got used to.
Okay. Don't point /usr/bin/python to a different version.
Quote:Quote:... put it first in your PATHCan you elaborate, please.
Either create a venv that points at the new python and activate it, or modify your login script (sometimes .bashrc, sometimes .profile or .bash_login) and modify the PATH so that the new python bin is in it. Maybe something like
PATH=/usr/local/python-3.10/bin:${PATH}
(but with whatever path is appropriate to the install.)That lets the system components use /usr/bin/python3 to hit the original version, but you can just do
python
or /usr/local/python-3.10/bin/python3
(again, with the correct path) to get to the new version.