我不断收到错误消息,没有名为gdata的模块。在我这样做之后
pip install --upgrade google-api-python-client
所以我试过这个
pip install gdata
并安装
gdata 2.0.18
但我仍然收到错误消息。如果我做点子列表我得
beautifulsoup4 (4.4.1)
dj-database-url (0.4.0)
Django (1.9.2)
django-bootstrap-pagination (1.6.1)
django-crispy-forms (1.6.0)
django-haystack (2.4.1)
django-markdown-deux (1.0.5)
django-pagedown (0.1.1)
django-taggit (0.18.1)
feedparser (5.2.1)
future (0.15.2)
gdata (2.0.18)
google-api-python-client (1.5.1)
gunicorn (19.4.5)
html5lib (0.9999999)
httplib2 (0.9.2)
lxml (3.6.0)
markdown2 (2.3.1)
oauth2client (2.2.0)
oauthlib (1.1.2)
Pillow (3.2.0)
pip (8.1.2)
psycopg2 (2.6.1)
pyasn1 (0.1.9)
pyasn1-modules (0.0.8)
requests (2.9.1)
requests-oauthlib (0.6.1)
rsa (3.4.2)
setuptools (20.6.7)
simplejson (3.8.2)
six (1.10.0)
tweepy (3.5.0)
uritemplate (0.6)
wheel (0.29.0)
whitenoise (3.0)
Whoosh (2.7.4)
如果这很重要,我会在django应用中使用它。我的问题是什么?
编辑如果我使用python shell并尝试导入它。我收到此错误消息
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/gdata/__init__.py", line 27, in <module>
import atom
File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/atom/__init__.py", line 133, in <module>
CreateClassFromXMLString)
File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/atom/__init__.py", line 97, in mark_deprecated
optional_warn_function.func_name = f.func_name
AttributeError: 'function' object has no attribute 'func_name'
编辑我刚刚在git
上阅读了这篇文章The client library is only designed for Python 2.4 - 2.6. See Issue 229:
http://code.google.com/p/gdata-python-client/issues/detail?
id=229&q=label:Type-Defect
It also support 2.6+ but not 3.* as yet. For 3.0 support please track
http://code.google.com/p/gdata-python-client/issues/detail?id=229
所以这可能是我的问题。这是从2015年5月25日
文档说最多3.4我使用3.5,所以我猜它不会工作