Forked from UbuntuEvangelist/How To Install Python Ubuntu 24.04 LTS
Created
December 8, 2020 18:08
-
-
Save badhonhitech/bc8a87fd3dfd322604c66210ac514bdf to your computer and use it in GitHub Desktop.
Python-3.8.6 Installation Ubuntu 20.04 LTS
This file contains hidden or 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 | |
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 | |
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