{"id":28091,"library":"pyexiv2","title":"pyexiv2","description":"A Python binding to exiv2 library for reading and writing image metadata (EXIF, IPTC, XMP, ICC Profile). Current version 2.15.5 supports Python 3.8+ and includes prebuilt wheels for Linux, macOS, and Windows. Releases follow exiv2 updates; active development.","status":"active","version":"2.15.5","language":"python","source_language":"en","source_url":"https://github.com/LeoHsiao1/pyexiv2","tags":["exif","iptc","xmp","metadata","image"],"install":[{"cmd":"pip install pyexiv2","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"pyexiv2 is not a module; use Image directly.","wrong":"from pyexiv2 import pyexiv2","symbol":"Image","correct":"from pyexiv2 import Image"},{"note":"ImageMetadata is deprecated since v2.14.0; use Image.","wrong":"from pyexiv2 import Image","symbol":"ImageMetadata","correct":"from pyexiv2 import ImageMetadata"}],"quickstart":{"code":"from pyexiv2 import Image\n\nimg = Image('test.jpg')\nimg.read_exif()\n# {'Exif.Image.Make': 'Canon', ...}\nimg.close()","lang":"python","description":"Open an image, read EXIF data, and close."},"warnings":[{"fix":"Replace ImageMetadata with Image.","message":"ImageMetadata() class is deprecated since v2.14.0. Use Image() instead.","severity":"deprecated","affected_versions":">=2.14.0"},{"fix":"Remove any calls to enableBMFF().","message":"enableBMFF() function is deprecated and no longer needed. BMFF support is always enabled.","severity":"deprecated","affected_versions":">=2.14.0"},{"fix":"Use img = Image(path); ...; img.close(), or use context manager with Image(path) as img:","message":"Always call close() on Image objects to release resources and avoid segmentation faults.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure input dict values are unique per tag or handle duplicates explicitly.","message":"modify_exif() may produce duplicate EXIF keys when writing the same tag multiple times. Use modify_exif() with duplicate keys carefully.","severity":"gotcha","affected_versions":">=2.12.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"pip install pyexiv2 (requires Python >=3.8)","cause":"Package not installed or wrong Python version.","error":"ImportError: cannot import name 'Image' from 'pyexiv2'"},{"fix":"Always call img.close() or use a context manager: with Image(path) as img:","cause":"Image object not closed properly, causing C library to crash.","error":"segmentation fault (core dumped)"},{"fix":"Use 'from pyexiv2 import Image' instead of 'import pyexiv2' and then pyexiv2.pyexiv2.","cause":"Incorrect import statement.","error":"AttributeError: module 'pyexiv2' has no attribute 'pyexiv2'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}