Last active
November 24, 2019 22:50
-
-
Save tejashah88/f6988fac21ece8c4dabcf767b43f92c1 to your computer and use it in GitHub Desktop.
Install python 3 from scratch. Helpful for upgrading python 3 version in GCP's Deep Learning VM.
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
VERSION=$1 | |
sudo apt install gcc make zlib1g-dev | |
sudo apt install libssl-dev # needed for SSL support | |
sudo apt install libsqlite3-dev # needed for SQLite support | |
sudo apt-get install libbz2-dev # needed for BZ2 compression support | |
wget "https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz" | |
tar xJf "Python-$VERSION.tar.xz" | |
cd "Python-$VERSION" | |
./configure --enable-optimizations --enable-loadable-sqlite-extensions | |
sudo make | |
sudo make install | |
cd .. | |
sudo pip3 install --upgrade pip | |
python3 -V | |
pip3 -V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage Instructions