5

I've already tried IPTCInfo3. But after successful installation with

pip3 install IPTCInfo

i get an import error:

Python 3.5.2 (default, Oct 11 2016, 04:59:56) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin

from iptcinfo import IPTCInfo

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ImportError: No module named 'iptcinfo'

4 Answers4

5

There is a Python 3 version of iptcinfo now. It is pip3 install iptcinfo3 and it works great out of the box with batteries included. Please try it out and submit any issues on github. I am the maintainer.

james-see
  • 12,210
  • 6
  • 40
  • 47
1

pip install IPTCinfo is what you don't want - it's the python2 only package. What you linked to isn't on PyPI, but that doesn't mean you can't install it!

Download the zip file from github, extract it, and in the resulting folder run: python setup.py install. I ran into an issue with the file naming, not sure if it was just a result of something I had done though - you can just open up setup.py and change py_modules=['iptcinfo3'], to py_modules=['iptcinfo'], if you get the same issue about there being no iptcinfo3 module.

From there you should be able to import as you normally would. I just ran a command for it and it worked.

Jens Astrup
  • 2,415
  • 2
  • 14
  • 20
0

Looking for the same. It appears that the gexiv2 branch of exiv2 mentioned by @mcepl above supports both python 2 and 3.

According to the Gnome gexiv2 site,future versions of GIMP will use gexiv2 for metadata which should ensure future support.

Janus
  • 5,421
  • 2
  • 26
  • 37
-3

Try this command :

pip install --upgrade python-iptables

It worked for me.

Cpt Kitkat
  • 1,392
  • 4
  • 31
  • 50