python install 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 python3 in ubuntu

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8

Example 4: how to install python pip in ubuntu

#First enter the following command to the terminal
@pip3 --version
# after that
@if it doesnt give a result like pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
# enter the following commands
sudo apt install python3-pip
sudo apt install python3-pip3
#Thats all
#Ranuga D

Example 5: install python on ubuntu

sudo apt install python3.8

Example 6: 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