Can't set unversioned python to manual python3.9 install

Issues related to applications and software problems and general support
Post Reply
johhnry
Posts: 1
Joined: 2021/03/30 22:27:21

Can't set unversioned python to manual python3.9 install

Post by johhnry » 2021/03/30 22:51:10

Hi,

I am running on CentOS Linux 8 x86_64 server and Python 3.6.8 installed.

I also compiled Python 3.9 from source using this link : https://linuxize.com/post/how-to-instal ... ntu-20-04/
And I did

Code: Select all

sudo make install
instead of

Code: Select all

sudo make altinstall
After that, I have now python3.9 installed in /usr/local/bin/python3.9

But I would like to have a python command aliased to python3.9 following this link : https://developers.redhat.com/blog/2018 ... in-rhel-8/

So I did : sudo alternatives --set python /usr/local/bin/python3.9 and it works but now python is not defined!

It's hard for me to understand what is going on with the different commands and aliases (I used ls -l):

Code: Select all

/bin/python3 -> /etc/alternatives/python3

/usr/bin/python3 -> /etc/alternatives/python3

/etc/alternatives/python3 -> /usr/bin/python3.6 

/usr/bin/python3 -> /etc/alternatives/python3

/usr/local/bin/python3 -> python3.9
But if I type python3 in the console, I have :

Code: Select all

Python 3.9.2 (default, Mar 29 2021, 22:24:03) 
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Can someone help me with that?

Thanks ;)

Post Reply