我正在尝试使用pip为python安装OpenEXR模块。
C:\Python27_64\Scripts\pip.exe install openexr
但是我收到以下错误:
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\
在收到此错误之前,我被要求安装Microsoft Visual C++ Compiler for Python 2.7
。所以我做了,这解决了第一个错误,但我仍然有错误,我正在向你展示。