Python 3.6 : Install

 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.0.0+33+0a10c0e1 AppStream  19 k

Installing dependencies:

 python3-pip  noarch 9.0.3-13.el8 AppStream  18 k

 python3-setuptools noarch 39.2.0-4.el8 BaseOS    162 k

Installing module profiles:

 python36/common

Enabling module streams:

 python36                  3.6

Transaction Summary

====================================================================

Install  3 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, Oct 7 2019, 17:58:22)

[GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]

[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/python2

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

[root@dlp ~]# python -V

Python 3.6.8

Comments

Popular posts from this blog

PostgreSQL - String Function

SwiftUI - TEXT

PostgreSQL - DATE/TIME Functions and Operators