Search code examples
pythonvirtualenvgdata

Atom.core not found when in virtualenv


I'm trying to use the google for content api for shopping via the gdata client library and the atom library seems to be giving me an error.

This only happens when I try to run my code in a virtualenv.

Traceback (most recent call last):
  File "/home/tabakd/documents/programming/kek/server/merchant.py", line 2, in <module>
    import atom.data
  File "/home/tabakd/documents/programming/kek/venv/lib/python2.7/site-packages/atom/data.py",       line 24, in <module>
    import atom.core
ImportError: No module named core

Thanks in advance for the help :D.

SOLUTION:

As per someones advice on IRC I was able to fix this error by adding from __future__ import absolute_import to the beginning of client.py and data.py in the atom directory.


Solution

  • As per someones advice on IRC I was able to fix this error by adding from future import absolute_import to the beginning of client.py and data.py in the atom directory.