Skip to content

Instantly share code, notes, and snippets.

@jspaezp
Created September 2, 2022 19:51
Show Gist options
  • Save jspaezp/1cb955c4d180efed9607d9d4ae69dbc8 to your computer and use it in GitHub Desktop.
Save jspaezp/1cb955c4d180efed9607d9d4ae69dbc8 to your computer and use it in GitHub Desktop.
Update python in Colab
# From: https://stackoverflow.com/questions/68657341/how-can-i-update-google-colabs-python-version
! python --version
# version 3.7 as default
#install python 3.9
!sudo apt-get update -y
!sudo apt-get install python3.10
#change alternatives
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
#check python version
!python --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment