在Google Cloud Shell上更新Python版本

问题描述

我的Google Cloud Shell当前具有不推荐使用的python 2.0。

任何人都有任何允许我在Google Cloud Shell中安装python 3.7的代码吗?

谢谢!

解决方法

Cloud Shell将Python 3.7.3作为python3:

$ which python3
/usr/bin/python3
$ python3
Python 3.7.3 (default,Jul 25 2020,13:03:44)
[GCC 8.3.0] on linux
Type "help","copyright","credits" or "license" for more information.
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>>