openexr
openexr copied to clipboard
How to solve this error?
OpenEXR.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZTIN13IlmThread_3_14TaskE
Can you describe more about how you encounter this error?
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'
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