1# Update the Raspbian
2sudo apt-get update
3ential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev tar wget vim
4# Install Python
5wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
6cd Python-3.8.0
7sudo ./configure --enable-optimizations
8sudo make -j 4
9sudo make altinstall
10# Make Python 3.8 as the default version
11echo "alias python=/usr/local/bin/python3.8" >> ~/.bashrc
12source ~/.bashrc
13# Check Python Version
14python -V
15# Clean up
16sudo rm -rf Python-3.8.0.tgz
17sudo rm -rf Python-3.8.0
1sudo apt-get update
2sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev
3wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
4sudo tar zxf Python-3.8.0.tgz
5cd Python-3.8.0
6sudo ./configure --enable-optimizations
7sudo make -j 4python3.8 -V
8sudo make altinstall
9python3.8 -V
10echo "alias python=/usr/local/bin/python3.8" >> ~/.bashrc
11source ~/.bashrc
12python -V
13