python-3.x - 在 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
>>>