你好,我在pydrive https://pypi.python.org/pypi/PyDrive上看到了这个错误,json键与脚本(a.py)的目录相同。
[XX@example.com 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...
[XX@example.com user]# vi a.py
[XX@example.com user]# cat a.py
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
gauth = GoogleAuth()
gauth.LocalWebserverAuth()
drive = GoogleDrive(gauth)
[XX@example.com 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
[XX@example.com user]#对此有什么想法吗?
发布于 2014-01-16 09:12:35
Python2.6没有附带2.6解析(但随2.7一起提供)
pip安装pip解析
https://stackoverflow.com/questions/21133212
复制相似问题