I can't seem to get python link to show 3.9.9... It always points to 3.9.2, Debian 11 default. In fact, python3 is not shifting to 3.9.9 either. But update-alternatives seems to be setup right.
# update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/python3.9 2 auto mode
1 /usr/bin/python3 1 manual mode
* 2 /usr/bin/python3.9 2 manual mode
Press <enter> to keep the current choice[*], or type selection number:
# ls -l /usr/bin/python*
lrwxrwxrwx 1 root root 24 Jan 14 07:48 /usr/bin/python -> /etc/alternatives/python
lrwxrwxrwx 1 root root 9 Apr 5 2021 /usr/bin/python3 -> python3.9
-rwxr-xr-x 1 root root 4703672 Mar 11 2021 /usr/bin/python3.9
lrwxrwxrwx 1 root root 36 Mar 11 2021 /usr/bin/python3.9-config -> arm-linux-gnueabihf-python3.9-config
lrwxrwxrwx 1 root root 16 Apr 5 2021 /usr/bin/python3-config -> python3.9-config
# python --version
Python 3.9.2
# python3 --version
Python 3.9.2
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Python Update Alternatives Not Working?
- canci
- Global Moderator
- Posts: 2502
- Joined: 2006-09-24 11:28
- Has thanked: 136 times
- Been thanked: 136 times
Re: Python Update Alternatives Not Working?
Did you install 3.9.9 manually? update-alternatives won't show manually installed options. I'm not sure how to manually add those, but maybe the manpage has more?
Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe
READ THIS:
* How to Post a Thread Here
* Other Tips and Great Resources
READ THIS:
* How to Post a Thread Here
* Other Tips and Great Resources
-
- Posts: 40
- Joined: 2021-12-23 22:22
Re: Python Update Alternatives Not Working?
Yeah, it was a manual install, i.e. compile. I explicitly added it to update-alternates, but I haven ot had time to get back to this issue, given other priorities. But I will at some point.
Re: Python Update Alternatives Not Working?
I am installing a more recent version of python for to make an app for my project X8 speeder. I used `sudo update-alternatives --install /usr/bin/python python /usr/local/bin/python2.7 1`
`python --version` still yeilds Python 2.6.6
`update-alternatives --config python` shows this
There is 1 program that provides 'python'.
Selection Command
-----------------------------------------------
*+ 1 /usr/local/bin/python2.7
Is there something I'm missing? Seems update-alternatives knows about my python 2.7 install, but the system doesn't use it.
`python --version` still yeilds Python 2.6.6
`update-alternatives --config python` shows this
There is 1 program that provides 'python'.
Selection Command
-----------------------------------------------
*+ 1 /usr/local/bin/python2.7
Is there something I'm missing? Seems update-alternatives knows about my python 2.7 install, but the system doesn't use it.