Skip to content

Instantly share code, notes, and snippets.

@toancong
Created March 12, 2018 02:36
Show Gist options
  • Save toancong/522a43700c9c88e24808915c02a86060 to your computer and use it in GitHub Desktop.
Save toancong/522a43700c9c88e24808915c02a86060 to your computer and use it in GitHub Desktop.
Install python 3.6.4
#!/bin/bash
export PYTHON_VERSION=3.6.4
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 \
gcc libssl-dev \
python python-dev
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
rm python.tar.tgz
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