openexr icon indicating copy to clipboard operation
openexr copied to clipboard

How to solve this error?

Open wh017 opened this issue 1 year ago • 3 comments

OpenEXR.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZTIN13IlmThread_3_14TaskE image

wh017 avatar Aug 23 '23 01:08 wh017

Can you describe more about how you encounter this error?

cary-ilm avatar Aug 26 '23 16:08 cary-ilm

I had the same problem and found a solution.

Problem

On ubuntu 22.04 64bit, python 3.10.12, I did:

sudo apt install openexr
pip install OpenEXR

=> pip said Successfully installed openexr-1.3.9

But I got the following error in python terminal:

>>> import OpenEXR
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /home/bmarechal/projects/smoke/stable/sources/experiments/model_upgrade/model_upgrade_venv/lib/python3.10/site-packages/OpenEXR.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZTIN13IlmThread_3_14TaskE

=> I guess there is an issue with the wheel for OpenEXR 1.3.9 and python 3.10

Solution

Force pip to install from source. Additional dependencies are required.

sudo apt install openexr libopenexr-dev zlib1g-dev
pip install --no-binary openexr openexr
>>> import OpenEXR
>>> OpenEXR.__version__
b'1.3.9'

irmo322 avatar Nov 08 '23 10:11 irmo322

I tried this approach, and it worked in my case:

1- downgrade the Python package to 3.7 2- [Ubuntu]: sudo apt install libopenexr-dev 3- pip install OpenEXR==1.3.8

amoazeni75 avatar Feb 10 '24 01:02 amoazeni75