Cannot import in python2.7
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gexiv2 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I am totally unable to use this library in python 2.7.
With the latest ubuntu package i am unable to:
>>> from gi.repository import GExiv2
I got a:
ImportError: cannot import name GExiv2
# python2.7
Python 2.7.4 (default, Sep 26 2013, 03:20:56)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GExiv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named gi.repository
The import works well with python3.
# python3
Python 3.3.1 (default, Sep 25 2013, 19:30:50)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GExiv2
>>>
But if i try to locate:
$ locate GExiv2.py
/usr/lib/
/usr/lib/
# dpkg -l| grep exiv
ii gir1.2-gexiv2-0.4 0.6.1-0ubuntu1 i386 GObject introspection data for the gexiv2 library
ii libexiv2-12 0.23-1 i386 EXIF/IPTC metadata manipulation library
ii libgexiv2-2 0.6.1-0ubuntu1 i386 GObject-based wrapper around the Exiv2 library
This was reported by Alessandro upstream at http:// redmine. yorba.org/ issues/ 7582
Robert Park replied to your problem, Alessandro, suggesting you try installing python.gi. Hve you tried that?