Install python 3.8 in ubuntu

Here are easy steps to install Python 3.8 in Ubuntu

 

  1. Update the packages list and install the packages necessary to build Python:
    • sudo apt update

       

    • sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
      

       

  2. Download the latest release’s source code from the Python download page using wget
    • wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz

       

  3. When the download finishes, extract the gzipped archive :
    • tar -xf Python-3.8.0.tgz

       

  4. Switch to the Python source directory and execute the configure script which performs a number of checks to make sure all of the dependencies on your system are present:
    • cd Python-3.8.0

       

    • ./configure --enable-optimizations

      The --enable-optimizations option optimizes the Python binary by running multiple tests. This makes the build process slower.

  5. Start the Python 3.8 build process:
    • make -j 8

       

  6. When the build process is complete, install the Python binaries by typing:
    1. sudo make altinstall

       

  7. That’s it. Python 3.8 has been installed and ready to be used. Verify it by typing:
    •  
      python3.8 --version

       

       

      
      
  8. The output should show the Python version:
    Python 3.8.0

     


 

By Muthali Ganesh

I am an engineer wih a masters in business administration from Chennai, India. I love discovering and sharing hacks.