Cannot import gdata.youtube.service
They work great
import gdata
import gdata.youtube
but when i try
from gdata.youtube 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/sitecustomize.py", line 540, in runfile
execfile(filename, namespace)
File "/home/dimitris/untitled1.py", line 8, in <module>
import gdata.youtube.service
File "/home/dimitris/anaconda/lib/python2.7/site-packages/gdata/youtube/service.py", line 39, in <module>
import gdata.service
File "/home/dimitris/anaconda/lib/python2.7/site-packages/gdata/service.py", line 76, in <module>
import atom.service
File "/home/dimitris/anaconda/lib/python2.7/site-packages/atom/service.py", line 33, in <module>
import atom.http_interface ImportError: No module named http_interface
Any advice?
source to share
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: http://pip.readthedocs.org/en/latest/installing.html
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.
source to share