Cannot import

They work great

import gdata 


but when i try

from import service as something


I am getting this error:

Traceback (most recent call last):   
  File "<stdin>", line 1, in <module>   
  File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/", line 540, in runfile
    execfile(filename, namespace)   
  File "/home/dimitris/", line 8, in <module>
  File "/home/dimitris/anaconda/lib/python2.7/site-packages/gdata/youtube/", line 39, in <module>
    import gdata.service   
  File "/home/dimitris/anaconda/lib/python2.7/site-packages/gdata/", line 76, in <module>
    import atom.service 
  File "/home/dimitris/anaconda/lib/python2.7/site-packages/atom/", line 33, in <module>
    import atom.http_interface ImportError: No module named http_interface


Any advice?


source to share

1 answer

It looks like the gdata package also includes the "atom" package. I am guessing that you may have downloaded the package and extracted it (from .zip or .tar.gz), which might cause import problems.

Instead, uninstall the downloaded package and try using pip to install the package, by running pip install gdata

, the Atom package will also be installed and everything should work fine. If you don't have pip, you can install it here:

Alternatively, you can also do a local install if you have the tarball by running pip install ~/my_path/gdata-2.0.18.tar.gz

If you already have a package installed, you may need to use a flag --upgrade

to install the latest version of the package.



All Articles