在python中安装openexr不';行不通
我已经在我的mac电脑上使用在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 ---------------------
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
。