POLLOX
POLLOX

Reputation: 302

Pydrive example script problems

Hello I´m getting this error with pydrive https://pypi.python.org/pypi/PyDrive , the json key is the same directory than script (a.py).

[[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]#

Any idea about this?

Upvotes: 0

Views: 943

Answers (1)

POLLOX
POLLOX

Reputation: 302

argparse is not shipped with Python 2.6 (but is shipped with 2.7)

pip install argparse

Upvotes: 1

Related Questions