
Now you can use python without explicitly typing the version. > sudo alternatives –set python /usr/bin/python3 To enable the command python, execute the following command. If you simply type the command pythonin the shell, it will give you a response something like below

To install pip, execute the following command The above command will print the version information. To verify the installation, use the following command So simply typing python will give you a “ command not found” response. To Install Python 3 in CentOS 8 or RHEL 8ĬentOS 8 and RHEL 8 does not have an unversioned python by default. Read the following blog post to install Python and pip in CentOS 8 / RHEL 8. NOTE: If you see the error while loading shared libraries: libpython3.8.so.1.Python is not available by default in CentOS 8 / RHEL 8.

If you are installing to a custom location, run the following command:.If you are installing to the standard location, run the following command.Run one of the following command to start installing Python 3.8 Change directory to where you decompressed the Python 3.8 package: cd /temp/Python-3.8.12ģ. Download Python 3.8 and decompress the package by running the following commands:Ĭd /temp curl -O tar -zxvf Python-3.8.12.tgzĢ.If you are interested to install python3.8 to a custom location then perform the following steps on your machine.īefore installing Python 3.8, you must install the necessary developer tools and packages such as gcc, make, Openssl-devel, Bzip2-devel, Libffi-devel, and Zlib-devel yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel -y The output will be: Python 3.8.6 Install Python3.8 to a custom location

Now let’s verify the Python3 version as follows: python3 -version or just type python3 Just type the serial number of the version you want to use.
