Skip to content

Instantly share code, notes, and snippets.

@sa-
Last active January 31, 2020 12:56
Show Gist options
  • Select an option

  • Save sa-/fbd72a87147b0a7b0cec7ffd3429075f to your computer and use it in GitHub Desktop.

Select an option

Save sa-/fbd72a87147b0a7b0cec7ffd3429075f to your computer and use it in GitHub Desktop.
Install python 3.7 on gcp ai notebook
# Install requirements
sudo apt-get install -y build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev zlib1g-dev openssl libffi-dev python3-dev python3-setuptools wget sudo apt-get install liblzma-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev libtk8.5 libgdm-dev libdb4o-cil-dev libpcap-dev
# Prepare to build
mkdir /tmp/Python37
cd /tmp/Python37
# Install
wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tar.xz
tar xvf Python-3.7.6.tar.xz
cd Python-3.7.6
./configure --enable-optimizations
sudo make altinstall
virtualenv -p python3.7 py37
. py37/bin/activate
pip install jupyterlab ipykernel
python -m ipykernel install --user --name py37
@sa-
Copy link
Author

sa- commented Jan 31, 2020

And then . py37/bin/activate && jupyter lab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment