Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/340.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在python中安装openexr不';行不通_Python_Ubuntu_Python Import_Apt Get_Openexr - Fatal编程技术网

在python中安装openexr不';行不通

在python中安装openexr不';行不通,python,ubuntu,python-import,apt-get,openexr,Python,Ubuntu,Python Import,Apt Get,Openexr,我已经在我的mac电脑上使用pip install openexr成功安装了openexr,但在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 ---------------------

我已经在我的mac电脑上使用
pip install openexr
成功安装了openexr,但在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
我尝试使用
apt-get-install-openexr
,它似乎安装时没有出现错误,但当我尝试在python中导入openexr时,它不起作用


有人知道为什么吗?

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


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


我在mac上没有这个问题,一个“brew安装openexr”肯定也安装了头文件。

您首先需要通过以下方式安装zlib

$ sudo apt-get install zlib1g-dev

最新版本为Ubuntu 18.04:

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

pip安装OpenEXR--user

我使用以下方法解决了这个问题:

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

它用于解决以下错误:
/usr/bin/ld:找不到-lz