Created
June 27, 2018 02:20
-
-
Save gdevanla/d37c1266c9c321775c73440cee41be8a to your computer and use it in GitHub Desktop.
Install Python 3.6.5 in Ubuntu 16+
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/bash | |
export PYTHON_VERSION=3.6.5 | |
export PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz | |
sudo apt update | |
sudo apt install --no-install-recommends -y \ | |
software-properties-common build-essential \ | |
libssl-dev libreadline-dev libbz2-dev libsqlite3-dev zlib1g-dev \ | |
python-minimal | |
cd ~/Downloads | |
wget "$PYTHON_DOWNLOAD_URL" -O python.tar.tgz | |
tar -zxvf python.tar.tgz | |
cd Python-$PYTHON_VERSION | |
./configure --enable-optimizations --enable-loadable-sqlite-extensions | |
make | |
sudo make install | |
cd .. | |
sudo rm -rf Python-$PYTHON_VERSION | |
alias python=python3 | |
alias pip=pip3 | |
pip install --upgrade pip | |
python --version | |
pip --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment