Python 3.6 : Install2021/08/02 |
Install Python 3.6.
|
|
[1] | It's possible to install Python 3.6 from AppStream. |
[root@dlp ~]# dnf module -y install python36 Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing group/module packages: python36 x86_64 3.6.8-2.module+el8.4.0+597+ddf0ddea appstream 18 k Installing dependencies: python3-pip noarch 9.0.3-19.el8.rocky appstream 19 k Installing module profiles: python36/common Enabling module streams: python36 3.6 Transaction Summary ================================================================================ Install 2 Packages ..... .....[root@dlp ~]# python3 -V Python 3.6.8 # verify to create test script [root@dlp ~]# echo -e "import sys\nprint(sys.version)" > python3_test.py [root@dlp ~]# python3 python3_test.py 3.6.8 (default, May 19 2021, 03:00:47) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] |
[2] | If you installed multiple version of Python 3, it's possible to switch them with [alternatives]. |
[root@dlp ~]# alternatives --config python3
There are 2 programs which provide 'python3'.
Selection Command
-----------------------------------------------
*+ 1 /usr/bin/python3.6
2 /usr/bin/python3.8
Enter to keep the current selection[+], or type selection number: 1
[root@dlp ~]# python3 -V Python 3.6.8 |
[3] | If you'd like to use [python] command which does not have version number, it's possible to switch them with [alternatives]. |
[root@dlp ~]# alternatives --config python
There are 3 programs which provide 'python'.
Selection Command
-----------------------------------------------
*+ 1 /usr/libexec/no-python
2 /usr/bin/python3
3 /usr/bin/python2
Enter to keep the current selection[+], or type selection number: 2
[root@dlp ~]# python -V Python 3.6.8 |
Sponsored Link |