Registry / serialization / pyexiv2

pyexiv2

JSON →
library2.15.5pypypi✓ verified 86d ago

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.

pip install pyexiv2
INSTALL
IMPORT
SIG · PYEXIV2
P
pyexiv2
serializationpythonv2.15.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Image
from pyexiv2 import Image
from pyexiv2 import pyexiv2
pyexiv2 is not a module; use Image directly.
ImageMetadata
from pyexiv2 import ImageMetadata
from pyexiv2 import Image
ImageMetadata is deprecated since v2.14.0; use Image.

Open an image, read EXIF data, and close.

from pyexiv2 import Image img = Image('test.jpg') img.read_exif() # {'Exif.Image.Make': 'Canon', ...} img.close()
Debug
Known issues
deprecatedImageMetadata() class is deprecated since v2.14.0. Use Image() instead.
fix
Replace ImageMetadata with Image.
affects: >=2.14.0
deprecatedenableBMFF() function is deprecated and no longer needed. BMFF support is always enabled.
fix
Remove any calls to enableBMFF().
affects: >=2.14.0
gotchaAlways call close() on Image objects to release resources and avoid segmentation faults.
fix
Use img = Image(path); ...; img.close(), or use context manager with Image(path) as img:
affects: all
gotchamodify_exif() may produce duplicate EXIF keys when writing the same tag multiple times. Use modify_exif() with duplicate keys carefully.
fix
Ensure input dict values are unique per tag or handle duplicates explicitly.
affects: >=2.12.0
Errors
Common errors & fixes
ImportError: cannot import name 'Image' from 'pyexiv2'
Package not installed or wrong Python version.
fix
pip install pyexiv2 (requires Python >=3.8)
segmentation fault (core dumped)
Image object not closed properly, causing C library to crash.
fix
Always call img.close() or use a context manager: with Image(path) as img:
AttributeError: module 'pyexiv2' has no attribute 'pyexiv2'
Incorrect import statement.
fix
Use 'from pyexiv2 import Image' instead of 'import pyexiv2' and then pyexiv2.pyexiv2.
Upgrade
Version history
2.15.5latest on PyPI · released Oct 14, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
pyexiv2 — pip install pyexiv2 · libregistry