python download for ubuntu code example

Example 1: ubuntu install python

# first do:
sudo apt-get update
# after do:
sudo apt-get install python3.6
# then it should be installed

Example 2: install python on ubuntu

sudo apt install python3.8

Example 3: how to install python in ubuntu

wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz

Example 4: python install ubuntu

root@host:~# apt-get install build-essential checkinstall
root@host:~# apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
    libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev

root@host:~# cd /usr/src/
root@host:~# wget https://www.python.org/ftp/python/$version/Python-$version.tgz
root@host:~# wget https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tgz

root@host:~# tar zxf Python-$version.tgz
root@host:~# tar xzf Python-3.8.6.tgz

root@host:~# cd Python-$version
root@host:~# cd Python--3.8.6

root@host:~# ./configure --enable-optimizations --with-ensurepip=install
root@host:~# make -j8
root@host:~# make altinstall