1

I'm new to installing modules, etc, but believe I've done everything correctly and I'm getting errors. I'm following the instructions here: https://developers.google.com/gdata/articles/python_client_lib#library

Steps: 1. downloaded Zip of gdata here: https://github.com/google/gdata-python-client 2. unzipped and placed into my Scripts folder: C:\Python34\Scripts\gdata-python-client-master 3. went to cmd, above directory and installed: I did get a bunch of syntax errors (commas, etc), assuming this is why the next steps aren't working...
4. in python prompt, it says i have module:

[gdata 2.0.18 (c:\python34\lib\site-packages), google-api-python-client 1.4.2 (c:\python34\lib\site-packages), httplib2 0.9.2 (c:\python34\lib\site-packages), oauth2client 1.5.1 (c:\python34\lib\site-packages), pip 6.0.8 (c:\python34\lib\site-packages), pyasn1 0.1.9 (c:\python34\lib\site-packages), pyasn1-modules 0.0.8 (c:\python34\lib\site-packages), requests 2.7.0 (c:\python34\lib\site-packages), rsa 3.2.3 (c:\python34\lib\site-packages), setuptools 12.0.5 (c:\python34\lib\site-packages), simplejson 3.8.1 (c:\python34\lib\site-packages), six 1.10.0 (c:\python34\lib\site-packages), uritemplate 0.6 (c:\python34\lib\site-packages)]


5) But when I try to import gdata i get an error:

>>> import gdata.spreadsheet.service
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    import gdata.spreadsheet.service
  File "C:\Python34\lib\site-packages\gdata\__init__.py", line 26, in <module>
    import atom
  File "C:\Python34\lib\site-packages\atom\__init__.py", line 132, in <module>
    CreateClassFromXMLString)
  File "C:\Python34\lib\site-packages\atom\__init__.py", line 96, in mark_deprecated
    optional_warn_function.func_name = f.func_name
AttributeError: 'function' object has no attribute 'func_name'

Any ideas?

1 Answer 1

1

Instead of trying to unzip to install, use pip:

http://pip.readthedocs.org/en/stable/installing/

You can install the library using pip install gdata:

https://pythonhosted.org/gdata/installation.html

Update: pip is a good way to install, but this was not actually the problem - the actual root problem was gdata compatibility with python2 vs. python3. The fix that worked is described here: https://github.com/google/gdata-python-client/issues/29

Specifically running this in the site-packages directory:

2to3 -w atom gdata

Be warned this will change many files, so having a backup or recovery strategy in place before beginning is strongly advised.

Sign up to request clarification or add additional context in comments.

7 Comments

Thanks, after the install I got a successful message, but when I run the import script I still get the same error
So if you start up a fresh python interpreter and type import gdata.spreadsheet.service you get an error? If so, that tells me it's still not properly installed.
ya, here's the console log that said succesful: C:\Python34\Scripts>pip install gdata You are using pip version 6.0.8, however version 7.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting gdata Downloading gdata-2.0.18.tar.gz (2.5MB) 100% |################################| 2.5MB 165kB/s Installing collected packages: gdata Running setup.py install for gdata Successfully installed gdata-2.0.18
Is the unzipped install still in C:\Python34\Scripts? If so, you might want to move it out of the way or delete it. I think import gdata will look in the current working directory first before checking site-packages.
Same issues... Thanks for trying to help debug... maybe it's a bug on the latest build on github?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.