

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

Or if you use the python command, you can see other information about Python: $ python Python 3.0.06 (default, Oct 16 2019, 15:28:01) on linux2 Type "help", "copyright", "credits" or "license" for more information.Just type the serial number of the version you want to use. To solve the problem for python 3, use the following command: $ sudo alternatives -set python /usr/bin/python3Īfter executing the above command, you can check the execution of the python command on your server: $ python -V Python 3.0.06 To fix the problem, you can use the alternatives command to fix the problem. The following message will appear when you use the python command in your Linux: $ python bash: python: command not found. Step 2 – Set the default version of python But it is not possible to use the python command alone, which we will solve in the next step. You can use Python using the python 3 command. To install Python on RHEL 8 and CentOS 8, use the following command: $ sudo dnf install python3Īfter installing python, you can use the command which you can see the executable file of Python: $ which python3 /usr/bin/python3 How to install Python 3 on RHEL 8 / CentOS 8 Recommended Article: Tutorial Install Python 3 on RHEL 8 / CentOS 8
