download python 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: linux ubuntu install python 3.7

sudo apt-get install python3.7

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

Example 5: ubuntu run python3 in terminal

HP@ProDesk:~$ python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>