在python中安装openexr不起作用

pro*_*Fun 6 python ubuntu apt-get openexr python-import

我已成功安装OpenEXR的使用pip install openexr我的Mac,但相同的命令在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
Run Code Online (Sandbox Code Playgroud)

我尝试使用apt-get install openexr似乎没有错误的安装,但是当我尝试使用import OpenEXRpython时,它不起作用。

有人知道为什么吗?

Joã*_*cho 9

最近在 Ubuntu 18.04 上工作:

sudo apt-get install libopenexr-dev
sudo apt-get install openexr
Run Code Online (Sandbox Code Playgroud)

pip install OpenEXR --user


sil*_*rip 5

您需要安装apt软件包“ libopenexr-dev”,这将解决pip问题。

我在Mac上没有这个问题,“ brew install openexr”也必须安装了标头。


小智 1

openexr 只是 C++ 实现。您需要 py-openexr 才能在 python 中使用。您可以在此链接上找到如何安装

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