24.3 C
Texas

How To Install Python 3.8 on CentOS 8

Introduction:

In this article, you will cover the Installation of Python 3.8 on your CentOS 8 system. Python is very popular programming language used to develop web applications, handle big data & perform complexity issues in mathematics, system scripting and much more. Just follow the steps to easily install Python 3.8 on CentOS 8.

Step 1: Installing Python Dependencies on CentOS 8

First of all install dependencies required to Install Python 3.8 on CentOS 8.

sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl-devel bzip2-devel libffi-devel

Output:

- Advertisement -
[root@localhost sabi]# sudo yum -y groupinstall "Development Tools"
Last metadata expiration check: 0:33:44 ago on Fri 27 Dec 2019 01:48:08 PM PKT.
Dependencies resolved.
Package Arch Version Repository
Size
Installing group/module packages:
asciidoc noarch 8.6.10-0.5.20180627gitf7c2274.el8 AppStream 216 k
autoconf noarch 2.69-27.el8 AppStream 710 k
automake noarch 1.16.1-6.el8 AppStream 713 k
bison x86_64 3.0.4-10.el8 AppStream 688 k
byacc x86_64 1.9.20170709-4.el8 AppStream 91 k
ctags x86_64 5.8-22.el8 AppStream 170 k
diffstat x86_64 1.61-7.el8 AppStream 44 k
flex x86_64 2.6.1-9.el8 AppStream 320 k
gdb x86_64 8.2-6.el8_0 AppStream 296 k
intltool noarch 0.51.0-11.el8 AppStream 66 k
libtool x86_64 2.4.6-25.el8 AppStream 709 k
ltrace x86_64 0.7.91-27.el8 AppStream 160 k
patchutils x86_64 0.3.4-10.el8 AppStream 116 k
perl-Fedora-VSP noarch 0.001-9.el8 AppStream 24 k
perl-generators noarch 1.10-7.el8 AppStream 18 k
pesign x86_64 0.112-25.el8 AppStream 181 k
rpm-build x86_64 4.14.2-11.el8_0 AppStream 166 k
source-highlight x86_64 3.1.8-16.el8 AppStream 661 k
systemtap x86_64 4.0-7.el8 AppStream 17 k
valgrind x86_64 1:3.14.0-10.el8 AppStream 11 M
valgrind-devel x86_64 1:3.14.0-10.el8 AppStream 89 k
rpm-sign x86_64 4.14.2-11.el8_0 BaseOS 75 k
Installing dependencies:
docbook-dtds noarch 1.0-69.el8 AppStream 377 k
docbook-style-xsl noarch 1.79.2-7.el8 AppStream 1.6 M
dyninst x86_64 9.3.2-12.el8 AppStream 3.7 M
gc x86_64 7.6.4-3.el8 AppStream 109 k
gdb-headless x86_64 8.2-6.el8_0 AppStream 3.7 M
graphviz x86_64 2.40.1-39.el8 AppStream 1.7 M
guile x86_64 5:2.0.14-7.el8 AppStream 3.5 M
libXaw x86_64 1.0.13-10.el8 AppStream 194 k
libatomic_ops x86_64 7.6.2-3.el8 AppStream 38 k
libbabeltrace x86_64 1.5.4-2.el8 AppStream 201 k
libdwarf x86_64 20180129-4.el8 AppStream 172 k
libipt x86_64 1.6.1-8.el8 AppStream 50 k
nss-tools x86_64 3.44.0-7.el8_0 AppStream 569 k
perl-XML-Parser x86_64 2.44-11.el8 AppStream 226 k
systemtap-client x86_64 4.0-7.el8 AppStream 3.6 M
systemtap-devel x86_64 4.0-7.el8 AppStream 2.2 M
systemtap-runtime x86_64 4.0-7.el8 AppStream 464 k
xorg-x11-fonts-ISO8859-1-100dpi
noarch 7.5-19.el8 AppStream 1.1 M
elfutils x86_64 0.174-6.el8 BaseOS 344 k
gettext-common-devel noarch 0.19.8.1-14.el8 BaseOS 419 k
gettext-devel x86_64 0.19.8.1-14.el8 BaseOS 331 k
m4 x86_64 1.4.18-7.el8 BaseOS 223 k
mokutil x86_64 1:0.3.0-9.el8 BaseOS 44 k
patch x86_64 2.7.6-9.el8_0 BaseOS 138 k
sgml-common noarch 0.6.3-50.el8 BaseOS 62 k
Installing weak dependencies:
gcc-gdb-plugin x86_64 8.2.1-3.5.el8 AppStream 116 k
kernel-debug-devel x86_64 4.18.0-80.11.2.el8_0 BaseOS 12 M
Installing Groups:
Development Tools
Transaction Summary
Install 49 Packages
Total download size: 54 M
Installed size: 196 M
Downloading Packages:
(1/49): asciidoc-8.6.10-0.5.20180627gitf7c2274.el8.noa 133 kB/s | 216 kB 00:01
(2/49): autoconf-2.69-27.el8.noarch.rpm 334 kB/s | 710 kB 00:02
(3/49): automake-1.16.1-6.el8.noarch.rpm 325 kB/s | 713 kB 00:02
(4/49): byacc-1.9.20170709-4.el8.x86_64.rpm 552 kB/s | 91 kB 00:00
(5/49): ctags-5.8-22.el8.x86_64.rpm 802 kB/s | 170 kB 00:00
(6/49): diffstat-1.61-7.el8.x86_64.rpm 288 kB/s | 44 kB 00:00
(7/49): bison-3.0.4-10.el8.x86_64.rpm 708 kB/s | 688 kB 00:00
(8/49): docbook-dtds-1.0-69.el8.noarch.rpm 860 kB/s | 377 kB 00:00
(9/49): flex-2.6.1-9.el8.x86_64.rpm 431 kB/s | 320 kB 00:00
(10/49): gc-7.6.4-3.el8.x86_64.rpm 316 kB/s | 109 kB 00:00
(11/49): gcc-gdb-plugin-8.2.1-3.5.el8.x86_64.rpm 153 kB/s | 116 kB 00:00
(12/49): gdb-8.2-6.el8_0.x86_64.rpm 92 kB/s | 296 kB 00:03
(13/49): docbook-style-xsl-1.79.2-7.el8.noarch.rpm 241 kB/s | 1.6 MB 00:06
(14/49): dyninst-9.3.2-12.el8.x86_64.rpm 222 kB/s | 3.7 MB 00:17
(15/49): gdb-headless-8.2-6.el8_0.x86_64.rpm 287 kB/s | 3.7 MB 00:13
(16/49): intltool-0.51.0-11.el8.noarch.rpm 40 kB/s | 66 kB 00:01
(17/49): libXaw-1.0.13-10.el8.x86_64.rpm 106 kB/s | 194 kB 00:01
(18/49): libatomic_ops-7.6.2-3.el8.x86_64.rpm 61 kB/s | 38 kB 00:00
(19/49): libbabeltrace-1.5.4-2.el8.x86_64.rpm 290 kB/s | 201 kB 00:00
(20/49): libdwarf-20180129-4.el8.x86_64.rpm 156 kB/s | 172 kB 00:01
(21/49): graphviz-2.40.1-39.el8.x86_64.rpm 100 kB/s | 1.7 MB 00:17
(22/49): libipt-1.6.1-8.el8.x86_64.rpm 379 kB/s | 50 kB 00:00
(23/49): ltrace-0.7.91-27.el8.x86_64.rpm 740 kB/s | 160 kB 00:00
(24/49): nss-tools-3.44.0-7.el8_0.x86_64.rpm 306 kB/s | 569 kB 00:01
(25/49): patchutils-0.3.4-10.el8.x86_64.rpm 72 kB/s | 116 kB 00:01
(26/49): perl-Fedora-VSP-0.001-9.el8.noarch.rpm 148 kB/s | 24 kB 00:00
(27/49): perl-XML-Parser-2.44-11.el8.x86_64.rpm 459 kB/s | 226 kB 00:00
(28/49): libtool-2.4.6-25.el8.x86_64.rpm 157 kB/s | 709 kB 00:04
(29/49): perl-generators-1.10-7.el8.noarch.rpm 135 kB/s | 18 kB 00:00
(30/49): pesign-0.112-25.el8.x86_64.rpm 570 kB/s | 181 kB 00:00
(31/49): rpm-build-4.14.2-11.el8_0.x86_64.rpm 559 kB/s | 166 kB 00:00
(32/49): systemtap-4.0-7.el8.x86_64.rpm 125 kB/s | 17 kB 00:00
(33/49): source-highlight-3.1.8-16.el8.x86_64.rpm 292 kB/s | 661 kB 00:02
(34/49): guile-2.0.14-7.el8.x86_64.rpm 168 kB/s | 3.5 MB 00:21
(35/49): systemtap-runtime-4.0-7.el8.x86_64.rpm 229 kB/s | 464 kB 00:02
(36/49): systemtap-devel-4.0-7.el8.x86_64.rpm 162 kB/s | 2.2 MB 00:14
(37/49): systemtap-client-4.0-7.el8.x86_64.rpm 226 kB/s | 3.6 MB 00:16
(38/49): valgrind-devel-3.14.0-10.el8.x86_64.rpm 199 kB/s | 89 kB 00:00
(39/49): xorg-x11-fonts-ISO8859-1-100dpi-7.5-19.el8.no 210 kB/s | 1.1 MB 00:05
(40/49): elfutils-0.174-6.el8.x86_64.rpm 59 kB/s | 344 kB 00:05
(41/49): gettext-devel-0.19.8.1-14.el8.x86_64.rpm 75 kB/s | 331 kB 00:04
(42/49): gettext-common-devel-0.19.8.1-14.el8.noarch.r 28 kB/s | 419 kB 00:14
(43/49): m4-1.4.18-7.el8.x86_64.rpm 145 kB/s | 223 kB 00:01
(44/49): mokutil-0.3.0-9.el8.x86_64.rpm 66 kB/s | 44 kB 00:00
(45/49): patch-2.7.6-9.el8_0.x86_64.rpm 32 kB/s | 138 kB 00:04
(46/49): rpm-sign-4.14.2-11.el8_0.x86_64.rpm 33 kB/s | 75 kB 00:02
(47/49): sgml-common-0.6.3-50.el8.noarch.rpm 177 kB/s | 62 kB 00:00
(48/49): valgrind-3.14.0-10.el8.x86_64.rpm 249 kB/s | 11 MB 00:44
(49/49): kernel-debug-devel-4.18.0-80.11.2.el8_0.x86_6 190 kB/s | 12 MB 01:06
Total 428 kB/s | 54 MB 02:08
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction

Check that gcc is present by running

[root@localhost sabi]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)

Step 2: Download latest Python 3.8 Archive

Type the below command to download the latest archive of Python 3.8 archive.

sudo yum -y install wget
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz

Now, extract the downloaded pages by typing

tar xvf Python-3.8.1.tgz

Move to the Python directory.

cd Python-3.8*/

Step 3: Installing Python 3.8 on CentOS 8

Let’s start installation setup by running the configure script

./configure --enable-optimizations

Start the compilation of Python 3.8 on CentOS 8

sudo make install

On successful Installation you will see the similar output:

/tmp/tmp9ly9eo2d/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
/tmp/tmp9ly9eo2d/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/ipaddress.py:1106: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
Looking in links: /tmp/tmp9ly9eo2d
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-19.2.3 setuptools-41.2.0

Confirm the Installation of Python 3.8 on CentOS 8

python3.8 --version

You can also check the pip version with pip3.8 –version command.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article