7

I am trying to install OpenEXR module for python using pip.

C:\Python27_64\Scripts\pip.exe install openexr

But I get the following error:

Collecting openexr
  Using cached OpenEXR-1.2.0.tar.gz
Installing collected packages: openexr
  Running setup.py install for openexr ... error
    Complete output from command c:\python27_64\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\tuket
\\appdata\\local\\temp\\pip-build-r6zwty\\openexr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().r
eplace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\tuket\appdata\local\temp
\pip-lledgs-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    copying Imath.py -> build\lib.win-amd64-2.7
    running build_ext
    building 'OpenEXR' extension
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    C:\Users\tuket\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/opt/local/include/OpenEXR -Ic:\python27_64\
include -Ic:\python27_64\PC /TpOpenEXR.cpp /Fobuild\temp.win-amd64-2.7\Release\OpenEXR.obj -g -DVERSION="1.2.0"
    cl : Command line warning D9002 : ignoring unknown option '-g'
    OpenEXR.cpp
    OpenEXR.cpp(9) : fatal error C1083: Cannot open include file: 'ImathBox.h': No such file or directory
    error: command 'C:\\Users\\tuket\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\
amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python27_64\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\tuket\\appdata\\local\\temp\\
pip-build-r6zwty\\openexr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.c
lose();exec(compile(code, __file__, 'exec'))" install --record c:\users\tuket\appdata\local\temp\pip-lledgs-record\insta
ll-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\tuket\appdata\local\te
mp\pip-build-r6zwty\openexr\

Before getting this error I was asked to install Microsoft Visual C++ Compiler for Python 2.7. So I did, and that fixed the first error but I still have the error I'm showing you.

tuket
  • 3,232
  • 1
  • 26
  • 41
  • 1
    Could you eventually make this work? If so, maybe you can tell us what you did [here](https://github.com/jamesbowman/openexrpython/issues/4). – Amir Mar 21 '18 at 18:20
  • 5
    I couldn't install from pip. I ended up downloading it from this page: http://www.lfd.uci.edu/~gohlke/pythonlibs/ – tuket Mar 21 '18 at 23:27
  • Late, but can be helpful (Using Anaconda): conda install -c conda-forge openexr-python – saveearth Apr 08 '21 at 15:38

1 Answers1

0

One option is to use Anaconda:

conda install -c conda-forge openexr-python

Source

Jeff Schaller
  • 2,352
  • 5
  • 23
  • 38