已安装:
pip install google-python-cloud-debugger
Requirement already satisfied (use --upgrade to upgrade): google-python-cloud-debugger in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): google-api-python-client in /usr/local/lib/python2.7/dist-packages (from google-python-cloud-debugger)
Requirement already satisfied (use --upgrade to upgrade): six<2,>=1.6.1 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client->google-python-cloud-debugger)
Requirement already satisfied (use --upgrade to upgrade): httplib2<1,>=0.8 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client->google-python-cloud-debugger)
Requirement already satisfied (use --upgrade to upgrade): oauth2client in /usr/local/lib/python2.7/dist-packages (from google-api-python-client->google-python-cloud-debugger)
Requirement already satisfied (use --upgrade to upgrade): uritemplate<1,>=0.6 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client->google-python-cloud-debugger)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from oauth2client->google-api-python-client->google-python-cloud-debugger)
Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules>=0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client->google-api-python-client->google-python-cloud-debugger)
Requirement already satisfied (use --upgrade to upgrade): rsa>=3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client->google-api-python-client->google-python-cloud-debugger)
Requirement already satisfied (use --upgrade to upgrade): simplejson>=2.5.0 in /usr/local/lib/python2.7/dist-packages (from uritemplate<1,>=0.6->google-api-python-client->google-python-cloud-debugger)
但是当试图导入时,我会得到ImportError: No module named uritemplate
。StackTrace是: googleapiclient/discovery.py", line 53, in <module>
是安装了uritemplate
:
pip install uritemplate
Requirement already satisfied (use --upgrade to upgrade): uritemplate in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): simplejson>=2.5.0 in /usr/local/lib/python2.7/dist-packages (from uritemplate)
uritemplate
的直接导入也不起作用。
我有同样的问题。 uritemplate
已下载到我的文件系统。解决该问题后,oauth2client
也是如此我必须更新。从https://github.com/google/oauth2client
所以我将更新的版本下载到了我的投影中并添加了路径。
当您直接导入云调试器时,您是调用python2.7还是python3?
$ python2.7
>>> import uritemplate
>>>
$ python3
>>> import uritemplate
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named uritemplate
请注意,Cloud Debugger(和Uritemplate)适用于Python 2.7。