2017-01-26 53 views
0
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並獲取此錯誤。請幫忙 !!!ImportError:沒有名爲發電機的模塊

回答

4

您有一個名爲「email.py」的本地文件,它隱藏了stdlib模塊。重命名您的文件。

+0

非常感謝,它的工作! – Sushant

相關問題