Forked from UbuntuEvangelist/How To Install Python Ubuntu 22.04 LTS
Last active
June 20, 2021 16:44
-
-
Save afahitech/68dc60401a281ab32ce5064a6d09f788 to your computer and use it in GitHub Desktop.
How To Install Python-3.8.6 Into Ubuntu 20.04 LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/sh | |
sudo apt update | |
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev | |
sudo apt-get install build-essential checkinstall | |
sudo apt autoremove | |
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev | |
cd /opt | |
sudo wget https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tgz | |
sudo tar xzf Python-3.8.6.tgz | |
ls -la | |
sudo rm -f Python-3.8.6.tgz | |
cd Python-3.8.6 | |
sudo ./configure --enable-optimizations | |
sudo make altinstall | |
python3.8 -V | |
sudo nano ~/.bashrc | |
# Add into the bottom | |
alias python=python3 | |
# Save & Exit ctrl+s and ctrl+x | |
alias python=python3 | |
sudo apt update | |
python3 --version | |
python --version | |
sudo apt update -y | |
sudo apt upgrade -y | |
sudo apt-get install python3-pip | |
sudo nano ~/.bashrc | |
# Add into the bottom | |
alias pip=pip3 | |
# Save & Exit ctrl+s and ctrl+x | |
alias pip=pip3 | |
sudo ln -s /usr/bin/pip3.8 /usr/bin/pip | |
sudo apt install python3-testresources | |
pip3 install --upgrade setuptools pip | |
pip3 install --upgrade pip | |
sudo apt update -y | |
sudo apt upgrade -y | |
which pip | |
sudo rm /usr/local/bin/pip | |
which pip3 | |
sudo rm /usr/local/bin/pip3 | |
sudo ln -s /usr/local/bin/pip3 /usr/local/bin/pip3 | |
pip install --user --upgrade pip | |
pip install uwsgi | |
sudo apt autoremove | |
nano ~/.bashrc | |
python -m pip3 --version | |
pip3 --version | |
pip --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment