Created
March 12, 2018 02:36
-
-
Save toancong/522a43700c9c88e24808915c02a86060 to your computer and use it in GitHub Desktop.
Install python 3.6.4
This file contains 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.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