1

I need to extract IPTC metadata from images. Most of the things I've read about Python packages on Windows suggest using pre-compiled binaries, but I don't see one for IPTCInfo, thus I tried pip3.

I'm getting an error from pip when trying to install this:

C:\Users\hackr>pip3 install IPTCInfo
Collecting IPTCInfo
  Downloading IPTCInfo-1.9.5-6.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\hackr\AppData\Local\Temp\pip-build-v4m344a7\IPTCInfo\setup.py", line 32
        print self.get_archive_files()
                 ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\hackr\AppData\Local\Temp\pip-build-v4m344a7\IPTCInfo

So, I tried to open that last temporary file it refrences, but it doesn't appear to exist...

james-see
  • 12,210
  • 6
  • 40
  • 47
Hack-R
  • 22,422
  • 14
  • 75
  • 131

2 Answers2

1

I have the same problem. Appears the IPTCinfo is for python-2. I will upgrade IPTCinfo for python-3.

However I have found the library exvi2 which provides the same type of image support. There is a python interface for this at https://wiki.gnome.org/Projects/gexiv2

1

I maintain IPTCInfo3 in Pypi. I recommend downloading it via pip3 install iptcinfo3 as it is specifically upgraded for Python3x. Follow the readme and issue comments for examples. Enjoy.

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