Python 3.8 : Install
Install Python 3.8.
[1]. It's possible to install Python 3.8 from AppStream.
[root@dlp ~]# dnf module -y install python38
CentOS-8 - AppStream 5.2 MB/s | 5.8 MB 00:01
CentOS-8 - Base 3.2 MB/s | 2.2 MB 00:00
CentOS-8 - Extras 6.3 kB/s | 6.7 kB 00:01
Dependencies resolved.
========================================================
Package Arch Version Repo Size
========================================================
Installing group/module packages:
python38 x86_64 3.8.0-6.module_el8.2.0+317+61fa6e7d AppStream 76 k
Installing dependencies:
python38-libs x86_64 3.8.0-6.module_el8.2.0+317+61fa6e7d AppStream 8.2 M
python38-pip-wheel noarch 19.2.3-5.module_el8.2.0+317+61fa6e7d AppStream 1.2 M
python38-setuptools-wheel noarch 41.6.0-4.module_el8.2.0+317+61fa6e7d AppStream 304 k
Installing weak dependencies:
python38-pip noarch 19.2.3-5.module_el8.2.0+317+61fa6e7d AppStream 1.9 M
python38-setuptools noarch 41.6.0-4.module_el8.2.0+317+61fa6e7d AppStream 667 k
Installing module profiles:
python38/common
Enabling module streams:
python38 3.8
Transaction Summary
========================================================
Install 6 Packages
.....
.....
[root@dlp ~]# python3 -V
Python 3.8.0
# 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.0 (default, May 7 2020, 02:49:39)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
[2]. 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/python3.8
Enter to keep the current selection[+], or type selection number: 3
[root@dlp ~]# python -V
Python 3.8.0
Comments
Post a Comment