0
trying to install gdata python library client,receiving following errors:
running install
running build
running build_py
running install_lib
byte-compiling C:\Python32\Lib\site-packages\gdata\apps\adminsettings\service.py to   
service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\apps\audit\service.py to service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\apps\groups\service.py to   

service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\apps\migration\service.py 
to service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\apps\service.py to service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\calendar\service.py to service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\client.py to client.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\contacts\client.py to client.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\Protocol\AllOrNothing.py    

to AllOrNothing.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\Protocol\Chaffing.py to   

Chaffing.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\PublicKey\DSA.py to DSA.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\PublicKey\ElGamal.py to   

ElGamal.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\PublicKey\pubkey.py to   

pubkey.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\PublicKey\qNEW.py to qNEW.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\PublicKey\RSA.py to RSA.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\test.py to test.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\Util\number.py to number.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\Util\randpool.py to 

randpool.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\Util\RFC1751.py to   

RFC1751.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\Crypto\Util\test.py to test.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\docs\client.py to client.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\docs\data.py to data.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\docs\service.py to service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\exif\__init__.py to __init__.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\geo\__init__.py to __init__.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\media\__init__.py to __init__.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\photos\service.py to service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\photos\__init__.py to __init__.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\sample_util.py to sample_util.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\service.py to service.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\sites\client.py to client.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\test_config.py to test_config.pyc 
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\integration\POP3_TLS.py   

to POP3_TLS.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\integration  

\TLSTwistedProtocolWrapper.py to TLSTwistedProtocolWrapper.pyc

byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\messages.py to messages.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\TLSConnection.py to 
TLSConnection.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\TLSRecordLayer.py to   

TLSRecordLayer.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\utils\compat.py to   
compat.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\utils\cryptomath.py to   

cryptomath.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\utils\jython_compat.py to 

jython_compat.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\utils\Python_RSAKey.py to   

Python_RSAKey.pyc
byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\utils\xmltools.py to    
xmltools.pyc

byte-compiling C:\Python32\Lib\site-packages\gdata\tlslite\X509.py to X509.pyc
C:\Python32\Lib\distutils\dist.py:257: UserWarning: Unknown distribution option:   

'install_requires'
warnings.warn(msg)
File "C:\Python32\Lib\site-packages\gdata\apps\adminsettings\service.py", line 51
  except gdata.service.RequestError, e:
                                 ^
SyntaxError: invalid syntax

File "C:\Python32\Lib\site-packages\gdata\apps\audit\service.py", line 134
  except gdata.service.RequestError, e:
                                 ^
SyntaxError: invalid syntax

File "C:\Python32\Lib\site-packages\gdata\apps\groups\service.py", line 96
  except gdata.apps.service.AppsForYourDomainException, e:
                                                      ^
SyntaxError: invalid syntax

File "C:\Python32\Lib\site-packages\gdata\apps\migration\service.py", line 86
  except gdata.service.RequestError, e:
                                 ^
SyntaxError: invalid syntax

File "C:\Python32\Lib\site-packages\gdata\apps\service.py", line 131
  except gdata.service.RequestError, e:
                                 ^
SyntaxError: invalid syntax

File "C:\Python32\Lib\site-packages\gdata\calendar\service.py", line 492
  raise Error, "Order By must be either 'lastmodified' or 'starttime'"
           ^
SyntaxError: invalid syntax

File "C:\Python32\Lib\site-packages\gdata\client.py", line 1040
  except RequestError, error:
                   ^
SyntaxError: invalid syntax

File "C:\Python32\Lib\site-packages\gdata\contacts\client.py", line 162
raise TypeError, "calendar_link Requires dictionary not %s" % type(link)
               ^
SyntaxError: invalid syntax

File "C:\Python32\Lib\site-packages\gdata\Crypto\Protocol\AllOrNothing.py", line 157
raise ValueError, "List must be at least length 2."
                ^
4

1 回答 1

2

您正在使用 python3,但该模块适用于 python2。从错误中看起来是这样。

如果您正在谈论这个http://code.google.com/p/gdata-python-client/downloads/list

它是python2的一个模块。python2和python3有一些变化,模块还没有移植到python3。所以,使用python2。

于 2012-01-24T06:52:47.390 回答