0

I want to be able to import the following Google Data Python Modules: atom.data, gdata.sites.client, gdata.sites.data

I've gone ahead and downloaded the files and even made changes to the PYTHONPATH variable as recommended here [link] (How to add to the pythonpath in windows 7?). Despite this I get an error stating:
Import error No module named atom.data.
What am I doing wrong? I've placed the GData files inside the Python27 folder.

THE CODE (JUST IN CASE):

#!C:\Python27

import atom.data
import gdata.sites.client
import gdata.sites.data

client = gdata.sites.client.SitesClient(source='i-l-v1', site='intratrial2', domain='inmobi.com')
client.ClientLogin('', '', client.source)

feed = client.GetSiteFeed()

for entry in feed.entry:
  print '%s (%s)' % (entry.title.text, entry.site_name.text)
  if entry.summary.text:
    print 'description: ' + entry.summary.text
  if entry.FindSourceLink():
    print 'this site was copied from site: ' + entry.FindSourceLink()
  print 'acl feed: %s\n' % entry.FindAclLink()
  print 'theme: ' + entry.theme.text
Community
  • 1
  • 1

2 Answers2

1

On Linux, I did a "pip install gdata" within a virtual environment and then created a symbolic link to gdata. That worked for me.

$source venv/bin/activate
$pip install gdata
$deactivate
$ln -s venv/lib/python2.7/site-packages/gdata .
Christie
  • 233
  • 2
  • 9
0

Have you tried installing it using ./setup.py install. It will do all the necessary things and you don't have to set any path from your side. Refer https://developers.google.com/gdata/articles/python_client_lib?csw=1 for more details.