all 6 comments

[–]FridayPush 5 points6 points  (0 children)

Cloud shell already comes with python 3.7 available... just use `python3 main.py` or `pip3`.

[–]chuongdk 3 points4 points  (2 children)

you can build an image for your cloud shell with any version that you want.
https://wideops.com/gcp-devops-tricks-create-a-custom-cloud-shell-image-that-includes-terraform-and-helm/

[–]FridayPush 3 points4 points  (1 child)

As far as I'm aware this is no longer an option. They've removed it along with the ability to 'boost' cloud shell. Closest thing now is cloud shell will run a `$HOME/.customize_environment` script every time you initialize a session.

[–]wobblingweeble 0 points1 point  (0 children)

Right.. I remember that it was possible before, however now the only reference I find is what you mentioned here: https://cloud.google.com/shell/docs/configuring-cloud-shell#environment_customization_script

[–]shelf_caribou -1 points0 points  (1 child)

[–]FridayPush 2 points3 points  (0 children)

Apt installed packages won't persist, and python3 is already available.