Installing Python on Centos7

Installing Python on Centos7

  1. Install Development tools using : 
      yum groupinstall "Development Tools" -y
      

2. Now change the dircetory to opt :
cd /opt/

3. Download the tar file for python using wget command :


4. Extract the file :
tar xvf Python-3.9.1.tgz


5. Change to the python directory :
cd Python-3.9*/

6. Run the following command 
./configure --enable-optimizations


7. Next step
sudo make altinstall

8. To check versions
  1. python3.9 --version
  2. which python3.9
  3. pip3.9 --version
  4. which pip3.9