谷歌云运行python_谷歌云shell能运行Python3吗

我之前已经运行过Credential Management Server。当我今天试着让它运行时,我得到一个错误,说Python3不受支持:-ERROR: Python 3 and later is not compatible with the Google Cloud SDK.

Please use Python version 2.7.x.

If you have a compatible Python interpreter installed, you can use it by setting

the CLOUDSDK_PYTHON environment variable to point to it.

所以我输入了以下命令:

^{pr2}$

重新构建环境并重新启动服务器。现在,当我试图访问服务器时,我发现python3版本的“print”出现了一个错误。在

问题1。Google云Shell Python example是否只与Python3兼容

问题2。我能让python3版本在这种环境下正确运行吗ERROR 2018-10-01 04:36:24,384 wsgi.py:263]

Traceback (most recent call last):

File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle

handler = _config_handle.add_wsgi_middleware(self._LoadHandler())

File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler

handler, path, err = LoadObject(self._handler)

File "/google/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject

obj = __import__(path[0])

File "/home/maherrj/credential-management-api/working/main.py", line 28, in

from oauth2client import client

File "/home/maherrj/credential-management-api/working/lib/oauth2client/client.py", line 39, in

from oauth2client import transport

File "/home/maherrj/credential-management-api/working/lib/oauth2client/transport.py", line 17, in

import httplib2

File "/home/maherrj/credential-management-api/working/lib/httplib2/__init__.py", line 382

print('%s:' % h, end=' ', file=self._fp)

^

SyntaxError: invalid syntax

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值