0
你好I'm收到此錯誤與pydrive https://pypi.python.org/pypi/PyDrive,JSON的關鍵是比腳本(a.py)相同的目錄。Pydrive示例腳本問題
[[email protected] user]# pip install PyDrive
Requirement already satisfied (use --upgrade to upgrade): PyDrive in /usr/lib/python2.6/site-packages/PyDrive-1.0.0-py2.6.egg
Requirement already satisfied (use --upgrade to upgrade): google-api-python-client>=1.2 in /usr/lib/python2.6/site-packages (from PyDrive)
Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.0 in /usr/lib64/python2.6/site-packages (from PyDrive)
Requirement already satisfied (use --upgrade to upgrade): httplib2>=0.8 in /usr/lib/python2.6/site-packages (from google-api-python-client>=1.2->PyDrive)
Cleaning up...
[[email protected] user]# vi a.py
[[email protected] user]# cat a.py
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
gauth = GoogleAuth()
gauth.LocalWebserverAuth()
drive = GoogleDrive(gauth)
[[email protected] user]# python a.py
Traceback (most recent call last):
File "a.py", line 1, in <module>
from pydrive.auth import GoogleAuth
File "/usr/lib/python2.6/site-packages/PyDrive-1.0.0-py2.6.egg/pydrive/auth.py", line 14, in <module>
from oauth2client.tools import ClientRedirectHandler
File "/usr/lib/python2.6/site-packages/oauth2client/tools.py", line 27, in <module>
import argparse
ImportError: No module named argparse
[[email protected] user]#
這方面有任何想法?
是什麼?你這個錯誤後怎麼辦?你解決了嗎?解決方案是什麼? –