Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm following the directions here to get some example code up and running using Google's API to write to a spreadsheet and I don't think gdata is installing correctly. When I run python setup.py install I get one warning about install_requires being an unknown distribution option (despite having easy_install properly installed) but it seems to install correctly. Here's the output:

C:\gdata\gdata>python setup.py install
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
 'install_requires'
  warnings.warn(msg)
running install
running build
running build_py
copying src\atom\auth.py -> build\lib\atom
copying src\atom\client.py -> build\lib\atom
copying src\atom\core.py -> build\lib\atom
copying src\atom\data.py -> build\lib\atom
copying src\atom\http.py -> build\lib\atom
copying src\atom\http_core.py -> build\lib\atom
copying src\atom\http_interface.py -> build\lib\atom
copying src\atom\mock_http.py -> build\lib\atom
copying src\atom\mock_http_core.py -> build\lib\atom
copying src\atom\mock_service.py -> build\lib\atom
copying src\atom\service.py -> build\lib\atom
copying src\atom\token_store.py -> build\lib\atom
copying src\atom\url.py -> build\lib\atom
copying src\atom\__init__.py -> build\lib\atom
copying src\gdata\apps_property.py -> build\lib\gdata
copying src\gdata\auth.py -> build\lib\gdata
copying src\gdata\client.py -> build\lib\gdata
copying src\gdata\core.py -> build\lib\gdata
copying src\gdata\data.py -> build\lib\gdata
copying src\gdata\gauth.py -> build\lib\gdata
copying src\gdata\sample_util.py -> build\lib\gdata
copying src\gdata\service.py -> build\lib\gdata
copying src\gdata\test_config.py -> build\lib\gdata
copying src\gdata\test_data.py -> build\lib\gdata
copying src\gdata\urlfetch.py -> build\lib\gdata
copying src\gdata\__init__.py -> build\lib\gdata
copying src\gdata\Crypto\test.py -> build\lib\gdata\Crypto
copying src\gdata\Crypto\__init__.py -> build\lib\gdata\Crypto
copying src\gdata\Crypto\Cipher\__init__.py -> build\lib\gdata\Crypto\Cipher
copying src\gdata\Crypto\Hash\HMAC.py -> build\lib\gdata\Crypto\Hash
copying src\gdata\Crypto\Hash\MD5.py -> build\lib\gdata\Crypto\Hash
copying src\gdata\Crypto\Hash\SHA.py -> build\lib\gdata\Crypto\Hash
copying src\gdata\Crypto\Hash\__init__.py -> build\lib\gdata\Crypto\Hash
copying src\gdata\Crypto\Protocol\AllOrNothing.py -> build\lib\gdata\Crypto\Prot
ocol
copying src\gdata\Crypto\Protocol\Chaffing.py -> build\lib\gdata\Crypto\Protocol

copying src\gdata\Crypto\Protocol\__init__.py -> build\lib\gdata\Crypto\Protocol

copying src\gdata\Crypto\PublicKey\DSA.py -> build\lib\gdata\Crypto\PublicKey
copying src\gdata\Crypto\PublicKey\ElGamal.py -> build\lib\gdata\Crypto\PublicKe
y
copying src\gdata\Crypto\PublicKey\pubkey.py -> build\lib\gdata\Crypto\PublicKey

copying src\gdata\Crypto\PublicKey\qNEW.py -> build\lib\gdata\Crypto\PublicKey
copying src\gdata\Crypto\PublicKey\RSA.py -> build\lib\gdata\Crypto\PublicKey
copying src\gdata\Crypto\PublicKey\__init__.py -> build\lib\gdata\Crypto\PublicK
ey
copying src\gdata\Crypto\Util\number.py -> build\lib\gdata\Crypto\Util
copying src\gdata\Crypto\Util\randpool.py -> build\lib\gdata\Crypto\Util
copying src\gdata\Crypto\Util\RFC1751.py -> build\lib\gdata\Crypto\Util
copying src\gdata\Crypto\Util\test.py -> build\lib\gdata\Crypto\Util
copying src\gdata\Crypto\Util\__init__.py -> build\lib\gdata\Crypto\Util
copying src\gdata\acl\data.py -> build\lib\gdata\acl
copying src\gdata\acl\__init__.py -> build\lib\gdata\acl
copying src\gdata\alt\appengine.py -> build\lib\gdata\alt
copying src\gdata\alt\app_engine.py -> build\lib\gdata\alt
copying src\gdata\alt\__init__.py -> build\lib\gdata\alt
copying src\gdata\analytics\client.py -> build\lib\gdata\analytics
copying src\gdata\analytics\data.py -> build\lib\gdata\analytics
copying src\gdata\analytics\service.py -> build\lib\gdata\analytics
copying src\gdata\analytics\__init__.py -> build\lib\gdata\analytics
copying src\gdata\apps\apps_property_entry.py -> build\lib\gdata\apps
copying src\gdata\apps\client.py -> build\lib\gdata\apps
copying src\gdata\apps\data.py -> build\lib\gdata\apps
copying src\gdata\apps\service.py -> build\lib\gdata\apps
copying src\gdata\apps\__init__.py -> build\lib\gdata\apps
copying src\gdata\apps\adminsettings\service.py -> build\lib\gdata\apps\adminset
tings
copying src\gdata\apps\adminsettings\__init__.py -> build\lib\gdata\apps\adminse
ttings
copying src\gdata\apps\audit\service.py -> build\lib\gdata\apps\audit
copying src\gdata\apps\audit\__init__.py -> build\lib\gdata\apps\audit
copying src\gdata\apps\emailsettings\client.py -> build\lib\gdata\apps\emailsett
ings
copying src\gdata\apps\emailsettings\data.py -> build\lib\gdata\apps\emailsettin
gs
copying src\gdata\apps\emailsettings\service.py -> build\lib\gdata\apps\emailset
tings
copying src\gdata\apps\emailsettings\__init__.py -> build\lib\gdata\apps\emailse
ttings
copying src\gdata\apps\groups\client.py -> build\lib\gdata\apps\groups
copying src\gdata\apps\groups\data.py -> build\lib\gdata\apps\groups
copying src\gdata\apps\groups\service.py -> build\lib\gdata\apps\groups
copying src\gdata\apps\groups\__init__.py -> build\lib\gdata\apps\groups
copying src\gdata\apps\migration\service.py -> build\lib\gdata\apps\migration
copying src\gdata\apps\migration\__init__.py -> build\lib\gdata\apps\migration
copying src\gdata\apps\multidomain\client.py -> build\lib\gdata\apps\multidomain

copying src\gdata\apps\multidomain\data.py -> build\lib\gdata\apps\multidomain
copying src\gdata\apps\multidomain\__init__.py -> build\lib\gdata\apps\multidoma
in
copying src\gdata\apps\organization\client.py -> build\lib\gdata\apps\organizati
on
copying src\gdata\apps\organization\data.py -> build\lib\gdata\apps\organization

copying src\gdata\apps\organization\service.py -> build\lib\gdata\apps\organizat
ion
copying src\gdata\apps\organization\__init__.py -> build\lib\gdata\apps\organiza
tion
copying src\gdata\blogger\client.py -> build\lib\gdata\blogger
copying src\gdata\blogger\data.py -> build\lib\gdata\blogger
copying src\gdata\blogger\service.py -> build\lib\gdata\blogger
copying src\gdata\blogger\__init__.py -> build\lib\gdata\blogger
copying src\gdata\books\data.py -> build\lib\gdata\books
copying src\gdata\books\service.py -> build\lib\gdata\books
copying src\gdata\books\__init__.py -> build\lib\gdata\books
copying src\gdata\calendar\client.py -> build\lib\gdata\calendar
copying src\gdata\calendar\data.py -> build\lib\gdata\calendar
copying src\gdata\calendar\service.py -> build\lib\gdata\calendar
copying src\gdata\calendar\__init__.py -> build\lib\gdata\calendar
copying src\gdata\calendar_resource\client.py -> build\lib\gdata\calendar_resour
ce
copying src\gdata\calendar_resource\data.py -> build\lib\gdata\calendar_resource

copying src\gdata\calendar_resource\__init__.py -> build\lib\gdata\calendar_reso
urce
copying src\gdata\codesearch\service.py -> build\lib\gdata\codesearch
copying src\gdata\codesearch\__init__.py -> build\lib\gdata\codesearch
copying src\gdata\contacts\client.py -> build\lib\gdata\contacts
copying src\gdata\contacts\data.py -> build\lib\gdata\contacts
copying src\gdata\contacts\service.py -> build\lib\gdata\contacts
copying src\gdata\contacts\__init__.py -> build\lib\gdata\contacts
copying src\gdata\contentforshopping\client.py -> build\lib\gdata\contentforshop
ping
copying src\gdata\contentforshopping\data.py -> build\lib\gdata\contentforshoppi
ng
copying src\gdata\contentforshopping\__init__.py -> build\lib\gdata\contentforsh
opping
copying src\gdata\docs\client.py -> build\lib\gdata\docs
copying src\gdata\docs\data.py -> build\lib\gdata\docs
copying src\gdata\docs\service.py -> build\lib\gdata\docs
copying src\gdata\docs\__init__.py -> build\lib\gdata\docs
copying src\gdata\dublincore\data.py -> build\lib\gdata\dublincore
copying src\gdata\dublincore\__init__.py -> build\lib\gdata\dublincore
copying src\gdata\exif\__init__.py -> build\lib\gdata\exif
copying src\gdata\finance\data.py -> build\lib\gdata\finance
copying src\gdata\finance\service.py -> build\lib\gdata\finance
copying src\gdata\finance\__init__.py -> build\lib\gdata\finance
copying src\gdata\geo\data.py -> build\lib\gdata\geo
copying src\gdata\geo\__init__.py -> build\lib\gdata\geo
copying src\gdata\health\service.py -> build\lib\gdata\health
copying src\gdata\health\__init__.py -> build\lib\gdata\health
copying src\gdata\media\data.py -> build\lib\gdata\media
copying src\gdata\media\__init__.py -> build\lib\gdata\media
copying src\gdata\notebook\data.py -> build\lib\gdata\notebook
copying src\gdata\notebook\__init__.py -> build\lib\gdata\notebook
copying src\gdata\oauth\rsa.py -> build\lib\gdata\oauth
copying src\gdata\oauth\__init__.py -> build\lib\gdata\oauth
copying src\gdata\opensearch\data.py -> build\lib\gdata\opensearch
copying src\gdata\opensearch\__init__.py -> build\lib\gdata\opensearch
copying src\gdata\photos\service.py -> build\lib\gdata\photos
copying src\gdata\photos\__init__.py -> build\lib\gdata\photos
copying src\gdata\projecthosting\client.py -> build\lib\gdata\projecthosting
copying src\gdata\projecthosting\data.py -> build\lib\gdata\projecthosting
copying src\gdata\projecthosting\__init__.py -> build\lib\gdata\projecthosting
copying src\gdata\sites\client.py -> build\lib\gdata\sites
copying src\gdata\sites\data.py -> build\lib\gdata\sites
copying src\gdata\sites\__init__.py -> build\lib\gdata\sites
copying src\gdata\spreadsheet\service.py -> build\lib\gdata\spreadsheet
copying src\gdata\spreadsheet\text_db.py -> build\lib\gdata\spreadsheet
copying src\gdata\spreadsheet\__init__.py -> build\lib\gdata\spreadsheet
copying src\gdata\spreadsheets\client.py -> build\lib\gdata\spreadsheets
copying src\gdata\spreadsheets\data.py -> build\lib\gdata\spreadsheets
copying src\gdata\spreadsheets\__init__.py -> build\lib\gdata\spreadsheets
copying src\gdata\tlslite\api.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\BaseDB.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\Checker.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\constants.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\errors.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\FileObject.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\HandshakeSettings.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\mathtls.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\messages.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\Session.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\SessionCache.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\SharedKeyDB.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\TLSConnection.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\TLSRecordLayer.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\VerifierDB.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\X509.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\X509CertChain.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\__init__.py -> build\lib\gdata\tlslite
copying src\gdata\tlslite\integration\AsyncStateMachine.py -> build\lib\gdata\tl
slite\integration
copying src\gdata\tlslite\integration\ClientHelper.py -> build\lib\gdata\tlslite
\integration
copying src\gdata\tlslite\integration\HTTPTLSConnection.py -> build\lib\gdata\tl
slite\integration
copying src\gdata\tlslite\integration\IMAP4_TLS.py -> build\lib\gdata\tlslite\in
tegration
copying src\gdata\tlslite\integration\IntegrationHelper.py -> build\lib\gdata\tl
slite\integration
copying src\gdata\tlslite\integration\POP3_TLS.py -> build\lib\gdata\tlslite\int
egration
copying src\gdata\tlslite\integration\SMTP_TLS.py -> build\lib\gdata\tlslite\int
egration
copying src\gdata\tlslite\integration\TLSAsyncDispatcherMixIn.py -> build\lib\gd
ata\tlslite\integration
copying src\gdata\tlslite\integration\TLSSocketServerMixIn.py -> build\lib\gdata
\tlslite\integration
copying src\gdata\tlslite\integration\TLSTwistedProtocolWrapper.py -> build\lib\
gdata\tlslite\integration
copying src\gdata\tlslite\integration\XMLRPCTransport.py -> build\lib\gdata\tlsl
ite\integration
copying src\gdata\tlslite\integration\__init__.py -> build\lib\gdata\tlslite\int
egration
copying src\gdata\tlslite\utils\AES.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\ASN1Parser.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\cipherfactory.py -> build\lib\gdata\tlslite\util
s
copying src\gdata\tlslite\utils\codec.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\compat.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\Cryptlib_AES.py -> build\lib\gdata\tlslite\utils

copying src\gdata\tlslite\utils\Cryptlib_RC4.py -> build\lib\gdata\tlslite\utils

copying src\gdata\tlslite\utils\Cryptlib_TripleDES.py -> build\lib\gdata\tlslite
\utils
copying src\gdata\tlslite\utils\cryptomath.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\dateFuncs.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\hmac.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\jython_compat.py -> build\lib\gdata\tlslite\util
s
copying src\gdata\tlslite\utils\keyfactory.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\OpenSSL_AES.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\OpenSSL_RC4.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\OpenSSL_RSAKey.py -> build\lib\gdata\tlslite\uti
ls
copying src\gdata\tlslite\utils\OpenSSL_TripleDES.py -> build\lib\gdata\tlslite\
utils
copying src\gdata\tlslite\utils\PyCrypto_AES.py -> build\lib\gdata\tlslite\utils

copying src\gdata\tlslite\utils\PyCrypto_RC4.py -> build\lib\gdata\tlslite\utils

copying src\gdata\tlslite\utils\PyCrypto_RSAKey.py -> build\lib\gdata\tlslite\ut
ils
copying src\gdata\tlslite\utils\PyCrypto_TripleDES.py -> build\lib\gdata\tlslite
\utils
copying src\gdata\tlslite\utils\Python_AES.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\Python_RC4.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\Python_RSAKey.py -> build\lib\gdata\tlslite\util
s
copying src\gdata\tlslite\utils\RC4.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\rijndael.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\RSAKey.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\TripleDES.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\xmltools.py -> build\lib\gdata\tlslite\utils
copying src\gdata\tlslite\utils\__init__.py -> build\lib\gdata\tlslite\utils
copying src\gdata\webmastertools\data.py -> build\lib\gdata\webmastertools
copying src\gdata\webmastertools\service.py -> build\lib\gdata\webmastertools
copying src\gdata\webmastertools\__init__.py -> build\lib\gdata\webmastertools
copying src\gdata\youtube\client.py -> build\lib\gdata\youtube
copying src\gdata\youtube\data.py -> build\lib\gdata\youtube
copying src\gdata\youtube\service.py -> build\lib\gdata\youtube
copying src\gdata\youtube\__init__.py -> build\lib\gdata\youtube
running install_lib
running install_egg_info
Removing C:\Python27\Lib\site-packages\gdata-2.0.17-py2.7.egg-info
Writing C:\Python27\Lib\site-packages\gdata-2.0.17-py2.7.egg-info

Attempting to run the sample code previously linked to results in the following:

C:\gdata>python gdata.py
Traceback (most recent call last):
  File "gdata.py", line 4, in <module>
    import gdata.spreadsheet.service
  File "C:\gdata\gdata.py", line 4, in <module>
    import gdata.spreadsheet.service
ImportError: No module named spreadsheet.service

But interestingly, if I simply run python from the command line and tap out the offending line - import gdata.spreadsheet.service - it works perfectly fine, which is why I'm guessing this is an install/config issue rather than a code issue.

Python 2.7 on Windows 7, if that matters.

share|improve this question
add comment

1 Answer 1

It appears to be an install question to which this is the answer:

python setup.py uses distutils which doesn't support install_requires. setuptools does, but also distribute (its successor) and pip (which basically uses either setuptool/distribute) do. But you actually have to use them. I.e. call setuptools through the easy_install command or pip install. Another way is to import setup from setuptools in your setup.py, but this not standard and makes everybody wanting to use your package to have setuptools installed.

share|improve this answer
    
adding from setuptools import setup has resolved the error during the setup process, but I still get ImportError: No module named spreadsheet.service when running gdata.py. Again, I can import spreadsheet.service via the interpreter but not in a script. Any ideas? –  David Perry Jul 19 '12 at 17:46
    
Try import spreadsheet.service instead of import gdata.spreadsheet.service, as gdata.py is already in your gdata folder. –  Cees Timmerman Jul 20 '12 at 9:56
    
Same error... I'm quite confused as to what could be wrong... –  David Perry Jul 23 '12 at 16:47
    
What do the tests and samples say from a minimal file with a less confusing name and location? Maybe your Python path is getting broken somehow. –  Cees Timmerman Jul 24 '12 at 13:32
    
Running all tests in module gdata_tests.spreadsheet_test ........... ---------------------------------------------------------------------- Ran 11 tests in 0.009s OK –  David Perry Jul 24 '12 at 22:52
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.