jamesbowman / openexrpython

OpenEXR bindings for Python
Other
94 stars 35 forks source link

Incompatible with OpenEXR 3.0 and Imath 3.0 #42

Open tatue64 opened 3 years ago

tatue64 commented 3 years ago

It seems that the python bindings are incompatible with changes in the current version OpenExr 3.0 and Imath 3.0, which includes the splitting of Imath into a separate module.

Installing the plugin with pip works without error, but when trying to use it, the imath libraries are not found. Recompiling the plugin form source does not work, because of the changes in the new versions.

This causes problems, for example, in the current version of Manjaro Linux (testing), which installs these new versions. I downgraded to the previous version, but i think the plugin should be updated.

tatue64 commented 3 years ago

If someone else has the problem, I can recommend OpenImageIO as a replacement. It provides a more high-level python interface that works well with the new versions of OpenEXR and Imath.

patzm commented 3 years ago

How did you downgrade exactly? I tried running

sudo pacman -U /var/cache/pacman/pkg/openexr-2.5.5-1-x86_64.pkg.tar.zst 

but it complains with

error: failed to commit transaction (conflicting files)
openexr: /usr/lib/libImath.so exists in filesystem (owned by imath)
openexr: /usr/lib/python3.9/site-packages/imath.so exists in filesystem (owned by imath)
tatue64 commented 3 years ago

It turned later out that downgrading has too much consequences because in the standard distribution OpenEXR 3.0 is now integrated in many tools people need, who bother for including OpenEXR at all. For example Krita, Blender etc.

I therefore returend to new version of OpenEXR and switched to OpenImageIO for python bindings. I was not aware of this possibility, but in my view it offers superior performance and a more logical python interface. The only drawback from a compatibility perspective is that it is not available via pip (as far as I know).

afichet commented 2 years ago

I have a fix for OpenEXR 3.x there: https://github.com/afichet/openexrpython (works for me on Linux with OpenEXR libs from the Arch distro packages)

But, this will most probably break compatibility with systems stuck with OpenEXR 2.x libraries. So I haven't done a merge request for this reason...

meshula commented 2 years ago

@afichet Your fork doesn't have an Issues section activated for discussion, would you be open to opening that up to continue discussion on your fork?

afichet commented 2 years ago

Ok, that shall be enabled now :-)