Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing OpenEXR on Mac #19

Closed
Qwlouse opened this issue Jul 28, 2020 · 7 comments
Closed

Installing OpenEXR on Mac #19

Qwlouse opened this issue Jul 28, 2020 · 7 comments

Comments

@Qwlouse
Copy link
Collaborator

Qwlouse commented Jul 28, 2020

Failed with `fatal error: 'ImathBox.h' file not found``

@Qwlouse
Copy link
Collaborator Author

Qwlouse commented Jul 28, 2020

Solution: Install openexr

brew install openexr

export CFLAGS="-I/Users/USERNAME/homebrew/include/OpenEXR -std=c++11"
export LDFLAGS="-L/Users/USERNAME/homebrew/lib"
pip install OpenEXR

@Qwlouse Qwlouse closed this as completed Jul 28, 2020
@taiya
Copy link
Collaborator

taiya commented Aug 14, 2020

Having similar issues – openexr.log

@taiya taiya reopened this Aug 14, 2020
@taiya
Copy link
Collaborator

taiya commented Aug 14, 2020

Followed your instructions above, with small modifications:

(python3) ~/dev/kubric: export CFLAGS="-I/usr/local/include/OpenEXR/ -std=c++11"
(python3) ~/dev/kubric: export LDFLAGS="-L/usr/local/lib"
(python3) ~/dev/kubric: pip install openexr
Collecting openexr
  Using cached OpenEXR-1.3.2.tar.gz (10 kB)
Building wheels for collected packages: openexr
  Building wheel for openexr (setup.py) ... done
  Created wheel for openexr: filename=OpenEXR-1.3.2-cp37-cp37m-macosx_10_15_x86_64.whl size=36249 sha256=81eedbde7ebf4cfab22a38028b7409b7977f4a52916614dc5fe0010b50ec1a82
  Stored in directory: /Users/atagliasacchi/Library/Caches/pip/wheels/d1/c6/6c/dcf5d042ed2d547da41021f47957b16bebe9cadfd095765d44
Successfully built openexr
Installing collected packages: openexr
Successfully installed openexr-1.3.2
(python3) ~/dev/kubric: 

@taiya
Copy link
Collaborator

taiya commented Aug 14, 2020

And by using brew --prefix our two solutions can be merged into one:

(python3) export CFLAGS="-I`brew --prefix`/include/OpenEXR -std=c++11"
(python3) export LDFLAGS="-L`brew --prefix`/lib"
(python3) ~/dev/kubric: pip install --upgrade --force-reinstall openexr
Processing /Users/atagliasacchi/Library/Caches/pip/wheels/d1/c6/6c/dcf5d042ed2d547da41021f47957b16bebe9cadfd095765d44/OpenEXR-1.3.2-cp37-cp37m-macosx_10_15_x86_64.whl
Installing collected packages: openexr
  Attempting uninstall: openexr
    Found existing installation: OpenEXR 1.3.2
    Uninstalling OpenEXR-1.3.2:
      Successfully uninstalled OpenEXR-1.3.2
Successfully installed openexr-1.3.2

@taiya
Copy link
Collaborator

taiya commented Aug 14, 2020

Also, after this succeeds in a virtualenv, the install will NOT fail in the blender REPL.
This is similar to what happened with pybullet (see this issue):

(python3) ~/dev/kubric: bpip install openexr
Processing /Users/atagliasacchi/Library/Caches/pip/wheels/d1/c6/6c/dcf5d042ed2d547da41021f47957b16bebe9cadfd095765d44/OpenEXR-1.3.2-cp37-cp37m-macosx_10_15_x86_64.whl
Installing collected packages: openexr
Successfully installed openexr-1.3.2

@markub3327
Copy link

export CFLAGS="-I/opt/homebrew/include/OpenEXR -I/opt/homebrew/include/Imath -std=c++11"
export LDFLAGS="-L/opt/homebrew/lib"

pip3 install OpenEXR

@joeylitalien
Copy link

joeylitalien commented Apr 4, 2023

Posting this for posterity because somehow I keep running into this problem over and over again on different computers. See proposed patch on #43 on the openexrpython main repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants