File "./home/quickstart.py", line 2, in <module>
import httplib2
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 29, in <module>
import email
File "/home/sushant/home/email.py", line 7, in <module>
from apiclient import discovery
File "/usr/local/lib/python2.7/dist-packages/apiclient/__init__.py", line 19, in <module>
from googleapiclient import discovery
File "/usr/local/lib/python2.7/dist-packages/googleapiclient/discovery.py", line 41, in <module>
from email.generator import Generator as BytesGenerator
ImportError: No module named generator
使用google-api-python-client并收到此错误。请帮忙 !!!
答案 0 :(得分:4)
您有一个名为“email.py”的本地文件,它隐藏了stdlib模块。重命名您的文件。