I edited the question for being too opinion based.
I am desperately searching for a library to manipulate (read/write) image metadata with Python 3.6 on Mac OS X El Capitan. I tried GExiv2. After approximately two hours I was able to install it and get it running, but it keeps generating further errors within Python3 I can't solve. I was not at all able to install py3exiv2. I could'nt find further alternatives (for Python3) to the two libraries mentioned.
Problems with GExiv2:
I first import the modules:
>>> import gi
>>> gi.require_version('GExiv2', '0.10.04')
>>> from gi.repository.GExiv2 import Metadata
Then I produce a Metadata-object and open the image:
>>> m = Metadata()
>>> m.open_path('Abb_WS_di-34_561_01.jpg')
True
When, however, I try to use the Metadata-Objects methods like m.get_tags()
. I get an Error:
>>> m.get_tags()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Metadata' object has no attribute 'get_tags'
.get_tags()
sums up the "lower" get_XYZ_tags()
methods and returns the concatenated lists produced by these methods. Calling a "lower" method like m.get_iptc_tags()
works:
>>> m.get_iptc_tags()
['Iptc.Application2.Byline', 'Iptc.Application2.City', 'Iptc.Application2.CountryCode', … ]
>>> m.get_tag_string('Iptc.Application2.CountryName')
'Deutschland'
I looked in the module and made sure that the methods are there. Maybe someone can give me a clue …
Thanks in advance!