LeoHsiao1 / pyexiv2

Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
GNU General Public License v3.0
196 stars 39 forks source link

Old version in pypi, not working with 3.11 #110

Closed reagle closed 1 year ago

reagle commented 1 year ago
Name: pyexiv2
Version: 2.5.0
Summary: Read/Write metadata(including EXIF, IPTC, XMP), comment and ICC Profile embedded in digital images.
Home-page: https://github.com/LeoHsiao1/pyexiv2
Author: LeoHsiao
Author-email: leohsiao@foxmail.com
License: GPLv3
Location: /Users/reagle/.pyenv/versions/3.11.3/lib/python3.11/site-packages
Requires:
Required-by:
❯ ~/bin/tag-image-keywords.py -h
Traceback (most recent call last):
  File "/Users/reagle/bin/tag-image-keywords.py", line 8, in <module>
    import pyexiv2
  File "/Users/reagle/.pyenv/versions/3.11.3/lib/python3.11/site-packages/pyexiv2/__init__.py", line 6, in <module>
    from .core import *
  File "/Users/reagle/.pyenv/versions/3.11.3/lib/python3.11/site-packages/pyexiv2/core.py", line 1, in <module>
    from .lib import exiv2api
  File "/Users/reagle/.pyenv/versions/3.11.3/lib/python3.11/site-packages/pyexiv2/lib/__init__.py", line 14, in <module>
    raise RuntimeError('pyexiv2 only supports these Python versions: {} . But your version is {} .'.format(expected_py_version, py_version))
RuntimeError: pyexiv2 only supports these Python versions: ['3.5', '3.6', '3.7', '3.8', '3.9'] . But your version is 3.1 .

OS: macOS 13.4 22F66 arm64

LeoHsiao1 commented 1 year ago

Hi, sorry, I don't have enough energy to release a fix patch for the old version of pyexiv2, so I suggest you install the newer version of pyexiv2. The change from v2.5 to v2.8 is just a few minor version changes. If you have problems with the upgrade, I will help you to solve it.

reagle commented 1 year ago

I'm sorry, you mean you can't release 2.8 to pypi right now? You are suggesting install from Github?

I'm going to use an alternative library for now. For this one, perhaps you could remove this package on pypi, or update its version compatibility?

LeoHsiao1 commented 1 year ago

I mean, the old version, v2.5.0, does not support python 3.11. I suggest you install the latest version, v2.8.1

LeoHsiao1 commented 1 year ago

pyexiv2 v2.5.0 was released in 2021, when python 3.10 was not yet released, let alone python 3.11

reagle commented 1 year ago

But v2.8.1 is not available on the command line, it pulls 2.5.0:

❯ pip install pyexiv2
Collecting pyexiv2
  Using cached pyexiv2-2.5.0-py3-none-any.whl
Installing collected packages: pyexiv2
Successfully installed pyexiv2-2.5.0
❯ pip show pyexiv2
Name: pyexiv2
Version: 2.5.0
Summary: Read/Write metadata(including EXIF, IPTC, XMP), comment and ICC Profile embedded in digital images.
Home-page: https://github.com/LeoHsiao1/pyexiv2
Author: LeoHsiao
Author-email: leohsiao@foxmail.com
License: GPLv3
Location: /Users/reagle/.pyenv/versions/3.11.3/lib/python3.11/site-packages
Requires:
Required-by:
LeoHsiao1 commented 1 year ago

Oh, I misunderstood your needs. I thought you were more interested in the older version v2.5.0. It turns out that you just want to install pyexiv2. There is a problem of pyexiv2 https://github.com/LeoHsiao1/pyexiv2/issues/108 . pyexiv2 is currently built using GitHub Action and there are no arm64 machines. So users with arm64 computers cannot use pip install pyexiv2 and have to compile it manually. This is difficult, so I suggest you change to an alternative library. As for me, I'll wait for GitHub Action to support ARM64 machines. https://github.com/actions/runner-images/issues/5631

reagle commented 1 year ago

Oh, okay, thank you.