Install openexr in python doesn't work

て烟熏妆下的殇ゞ 提交于 2019-11-30 05:24:43

问题


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?


回答1:


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.




回答2:


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




回答3:


You first need to install zlib by:

$ sudo apt-get install zlib1g-dev



回答4:


I installed in Ubuntu 16.04 by doing the following commands:

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

pip install OpenEXR --user



来源:https://stackoverflow.com/questions/45601949/install-openexr-in-python-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!