0

I want to work with OpenEXr package on python but I couldn't import it on both python 2.7 and 3.8 :

Python 3.8.10 (default, Mar 15 2022, 12:22:08) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenEXr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'OpenEXr'
>>> 

Python 2.7.18 (default, Mar  8 2021, 13:02:45) 
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenEXr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named OpenEXr
>>> 

I tried to install it using :

pip install openexr

pip3 install openexr

sudo apt install libopenexr-dev

But with no success. I'm on ubuntu 20.04. Any solutions to that?

EDIT:

python3 -m pip show openexr

Name: OpenEXR
Version: 1.3.2
Summary: Python bindings for ILM's OpenEXR image file format
Home-page: http://www.excamera.com/sphinx/articles-openexr.html
Author: James Bowman
Author-email: jamesb@excamera.com
License: UNKNOWN
Location: /home/jros/.local/lib/python3.8/site-packages
Requires: 
Required-by:

pip version

pip --version

pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
Ja_cpp
  • 2,426
  • 7
  • 27
  • 49
  • 1
    Do your python's find the module, what is the output of `python2 -m pip show openexr` or `python3 -m pip show openexr` ? Please [edit] your question and paste the output, maybe also the pip-versions using. – hc_dev May 22 '22 at 10:10
  • yes python3 did find it, I edited my question with the output. – Ja_cpp May 22 '22 at 10:19
  • Could it be a typo? Compare pip output `Name: OpenEXR` with `>>> import OpenEXr` and resulting error `No module named 'OpenEXr'`. If not, then I would next verify that `site-packages/` directory has required folder (e.g. `OpenEXR*`) and files (compiled and executable). – hc_dev May 22 '22 at 11:17
  • And you mentioned "tried to install it ..But with no success.". What was the output and errors when installing (e.g. for `pip3 install`) ? Maybe any of those [issues](https://github.com/sanguinariojoe/pip-openexr/issues?q=is%3Aissue+is%3Aclosed) may help. – hc_dev May 22 '22 at 11:23
  • sorry by no success I meant importing the package, I didn't get any errors during the installation. Now it is working with python2, I can import the package but not yet with python3. Still getting the same error as above – Ja_cpp May 22 '22 at 12:15
  • For anyone having the same issue please check my answer here https://stackoverflow.com/questions/72364623/modulenotfounderror-no-module-named-openexr-on-blender/72368163#72368163 – Ja_cpp May 24 '22 at 19:02

0 Answers0