15

I have successfully installed openexr using pip install openexr on my mac, but the same command fails on Ubuntu:

OpenEXR.cpp:9:22: fatal error: ImathBox.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for openex

I tried using apt-get install openexr which seems like to install without an error but then when I try to import OpenEXR in python, it doesn't work.

Does anyone know why?

Pierre Prinetti
  • 9,092
  • 6
  • 33
  • 49
programmingIsFun
  • 1,057
  • 2
  • 11
  • 20

5 Answers5

15

You need to install the apt package "libopenexr-dev" this will resolve the pip issue.

I didn't have this issue on the mac, a "brew install openexr" must've installed the headers also.

silicontrip
  • 906
  • 7
  • 23
12

Works as recently as Ubuntu 18.04:

sudo apt-get install libopenexr-dev
sudo apt-get install openexr

pip install OpenEXR --user

legel
  • 2,507
  • 3
  • 23
  • 22
João Cartucho
  • 3,688
  • 32
  • 39
4

You first need to install zlib by:

$ sudo apt-get install zlib1g-dev
Azeem
  • 11,148
  • 4
  • 27
  • 40
kde
  • 41
  • 1
1

openexr is only the c++ implementation. You need the py-openexr to be able to use in python. You can find how to install on this link

http://excamera.com/sphinx/articles-openexr.html

weblucas
  • 46
  • 2
0

I solved it using this:

sudo apt-get install openexr,
sudo apt-get install libopenexr-dev,
pip install openexr
Farhood ET
  • 1,432
  • 15
  • 32