Skip to content

Instantly share code, notes, and snippets.

@bilalbaraz
Created June 7, 2018 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bilalbaraz/d58dec56fa006f30ba3ef41ede1f8eb4 to your computer and use it in GitHub Desktop.
Save bilalbaraz/d58dec56fa006f30ba3ef41ede1f8eb4 to your computer and use it in GitHub Desktop.
Install Python 3.6.5 in Ubuntu 16+
#!/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