【Python3】CentOS9 Streamでデフォルトのpythonversionを指定する

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
[root@controller01 ~]# sudo alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 110 [root@controller01 ~]# sudo alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 120 [root@controller01 ~]# alternatives --list ebtables auto /usr/sbin/ebtables-nft ld auto /usr/bin/ld.bfd man.7.gz auto /usr/share/man/man7/man.man-pages.7.gz arptables auto /usr/sbin/arptables-nft cifs-idmap-plugin auto /usr/lib64/cifs-utils/cifs_idmap_sss.so man auto /usr/bin/man.man-db libnssckbi.so.x86_64 auto /usr/lib64/pkcs11/p11-kit-trust.so soelim auto /usr/bin/soelim.groff python3 auto /usr/bin/python3.12 iptables auto /usr/sbin/iptables-nft [root@controller01 ~]# sudo alternatives --config python3 There are 2 programs which provide 'python3'. Selection Command ----------------------------------------------- 1 /usr/bin/python3.10 *+ 2 /usr/bin/python3.12 Enter to keep the current selection[+], or type selection number: 2 [root@controller01 ~]# |