Last active
January 31, 2020 12:56
-
-
Save sa-/fbd72a87147b0a7b0cec7ffd3429075f to your computer and use it in GitHub Desktop.
Install python 3.7 on gcp ai notebook
This file contains hidden or 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
| # 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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And then
. py37/bin/activate && jupyter lab