2

安装:

 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. 堆栈跟踪是: 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也行不通..

4

2 回答 2

0

我也有同样的问题。 uritemplate已下载到我的文件系统。解决这个问题后,oauth2client 我不得不更新同样的问题。从https://github.com/google/oauth2client下载

所以我将更新版本下载到我的项目中并添加了它的路径。

于 2016-06-15T17:53:35.770 回答
0

你是在导入云调试器时调用python2.7还是python3,还是直接uritemplate?

$ python2.7 
>>> import uritemplate
>>> 
$ python3 
>>> import uritemplate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named uritemplate

请注意,云调试器(和 uritemplate)适用于 python 2.7。

于 2016-06-15T17:32:29.430 回答