How To Install Python On Linux 2.x/3.x latest version

How To Install Python On Linux 2.x/3.x latest version

To install the latest version of Python on Linux 2.x or 3.x, you can use the following steps:

  1. Install the required packages:
sudo apt-get update
sudo apt-get install -y build-essential checkinstall
Sou‮r‬ce:www.lautturi.com

This will install the build-essential and checkinstall packages, which are required to build and install Python.

  1. Download the latest version of Python:
wget https://www.python.org/ftp/python/3.x.x/Python-3.x.x.tgz

Replace 3.x.x with the version of Python you want to install.

  1. Extract the downloaded archive:
tar -xvf Python-3.x.x.tgz
  1. Change to the directory of the extracted archive:
cd Python-3.x.x
  1. Configure and build Python:
./configure
make
  1. Install Python:
sudo checkinstall

This will install Python and create a package for it, so that you can easily remove it later if needed.

  1. Test the installation:
python3 -V

This will print the version of Python you have installed, indicating that it is working correctly.

Created Time:2017-10-28 21:38:52  Author:lautturi