Skip to content

Instantly share code, notes, and snippets.

@nanguoyu
Last active June 6, 2021 21:03
Show Gist options
  • Save nanguoyu/0f67ce488da4b3ca179d3af0c8cdc699 to your computer and use it in GitHub Desktop.
Save nanguoyu/0f67ce488da4b3ca179d3af0c8cdc699 to your computer and use it in GitHub Desktop.
Install Python3.8 in Ubutun18.04 from source
apt-get update && apt-get upgrade -y &&\
apt-get install -y wget \
build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz &&\
tar -xf Python-3.8.0.tgz &&\
cd Python-3.8.0 &&\
./configure --enable-optimizations &&\
make -j8 &&\
make altinstall
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 3 &&\
update-alternatives --install /usr/bin/pip3 pip3 /usr/local/bin/pip3.8 3 &&\
pip3 install --upgrade pip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment