Rocky_Linux_8
Sponsored Link

Python 3.8 : Install2021/08/02

 
Install Python 3.8.
[1] It's possible to install Python 3.8 from AppStream.
[root@dlp ~]#
dnf module -y install python38

Dependencies resolved.
==========================================================================================
 Package                     Arch    Version                              Repo        Size
==========================================================================================
Installing group/module packages:
 python38                    x86_64  3.8.6-3.module+el8.4.0+595+c96abaa2  appstream   78 k
Installing dependencies:
 python38-libs               x86_64  3.8.6-3.module+el8.4.0+595+c96abaa2  appstream  8.3 M
 python38-pip-wheel          noarch  19.3.1-1.module+el8.4.0+570+c2eaf144 appstream  1.2 M
 python38-setuptools-wheel   noarch  41.6.0-4.module+el8.4.0+570+c2eaf144 appstream  303 k
Installing weak dependencies:
 python38-pip                noarch  19.3.1-1.module+el8.4.0+570+c2eaf144 appstream  1.9 M
 python38-setuptools         noarch  41.6.0-4.module+el8.4.0+570+c2eaf144 appstream  666 k
Installing module profiles:
 python38/common
Enabling module streams:
 python38                            3.8

Transaction Summary
==========================================================================================
Install  6 Packages
.....
.....

[root@dlp ~]#
python3 -V

Python 3.8.6

# verify to create test script

[root@dlp ~]#
echo -e "import sys\nprint(sys.version)" > python3_test.py

[root@dlp ~]#
python3 python3_test.py

3.8.6 (default, Jun 29 2021, 21:14:45)
[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: 2

[root@dlp ~]#
python3 -V

Python 3.8.6
[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 4 programs which provide 'python'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/libexec/no-python
   2           /usr/bin/python3
   3           /usr/bin/python2
   4           /usr/bin/python3.8

Enter to keep the current selection[+], or type selection number: 4

[root@dlp ~]#
python -V

Python 3.8.6
Matched Content