在 Windows 平台上安装 OpenEXR 时遇到问题。我用pip install OpenEXR
ERROR: Command errored out with exit status 1:
command: 'd:\dl-3d\gridding_residual_network\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip-install-5adtpb33\\openexr_a32133
8e34444c229fc2744bf45c44e2\\setup.py'"'"'; __file__='"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip-install-5adtpb33\\openexr_a321338e34444c229fc2744bf45c44e2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"
'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\anujp\AppData\Local\Temp\pip-record-rpd0410_\inst
all-record.txt' --single-version-externally-managed --compile --install-headers 'd:\dl-3d\gridding_residual_network\include\site\python3.7\OpenEXR'
cwd: C:\Users\anujp\AppData\Local\Temp\pip-install-5adtpb33\openexr_a321338e34444c229fc2744bf45c44e2\
Complete output (15 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying Imath.py -> build\lib.win-amd64-3.7
running build_ext
building 'OpenEXR' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/
opt/local/include/OpenEXR -Id:\dl-3d\gridding_residual_network\include -IC:\Users\anujp\AppData\Local\Programs\Python\Python37\include -IC:\Users\anujp\AppData\Local\Programs\Python\Python37\include "-IC:\P
rogram Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\
Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:
\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TpOpenEXR.cpp /Fobuild\temp.win-amd64-3.7\Release\OpenEXR.obj
-g -DVERSION="1.3.2"
cl : Command line warning D9002 : ignoring unknown option '-g'
OpenEXR.cpp
OpenEXR.cpp(36): fatal error C1083: Cannot open include file: 'ImathBox.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\dl-3d\gridding_residual_network\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip
-install-5adtpb33\\openexr_a321338e34444c229fc2744bf45c44e2\\setup.py'"'"'; __file__='"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip-install-5adtpb33\\openexr_a321338e34444c229fc2744bf45c44e2\\setup.py'"'"
';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\anujp\AppData\Lo
cal\Temp\pip-record-rpd0410_\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\dl-3d\gridding_residual_network\include\site\python3.7\OpenEXR' Check the logs for full c
ommand output.
(gridding_residual_network) D:\Dl-3d\gridding_residual_network>pip install OpenEXR
Collecting OpenEXR
Using cached OpenEXR-1.3.2.tar.gz (10 kB)
Using legacy 'setup.py install' for OpenEXR, since package 'wheel' is not installed.
Installing collected packages: OpenEXR
Running setup.py install for OpenEXR ... error
ERROR: Command errored out with exit status 1:
command: 'd:\dl-3d\gridding_residual_network\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip-install-okpybcu1\\openexr_a7958a
1d3c7a4b8bab4d443151977a78\\setup.py'"'"'; __file__='"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip-install-okpybcu1\\openexr_a7958a1d3c7a4b8bab4d443151977a78\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"
'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\anujp\AppData\Local\Temp\pip-record-5ebwe65m\inst
all-record.txt' --single-version-externally-managed --compile --install-headers 'd:\dl-3d\gridding_residual_network\include\site\python3.7\OpenEXR'
cwd: C:\Users\anujp\AppData\Local\Temp\pip-install-okpybcu1\openexr_a7958a1d3c7a4b8bab4d443151977a78\
Complete output (15 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying Imath.py -> build\lib.win-amd64-3.7
running build_ext
building 'OpenEXR' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -I/
opt/local/include/OpenEXR -Id:\dl-3d\gridding_residual_network\include -IC:\Users\anujp\AppData\Local\Programs\Python\Python37\include -IC:\Users\anujp\AppData\Local\Programs\Python\Python37\include "-IC:\P
rogram Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\
Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:
\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /TpOpenEXR.cpp /Fobuild\temp.win-amd64-3.7\Release\OpenEXR.obj
-g -DVERSION="1.3.2"
cl : Command line warning D9002 : ignoring unknown option '-g'
OpenEXR.cpp
OpenEXR.cpp(36): fatal error C1083: Cannot open include file: 'ImathBox.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\dl-3d\gridding_residual_network\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip
-install-okpybcu1\\openexr_a7958a1d3c7a4b8bab4d443151977a78\\setup.py'"'"'; __file__='"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip-install-okpybcu1\\openexr_a7958a1d3c7a4b8bab4d443151977a78\\setup.py'"'"
';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\anujp\AppData\Lo
cal\Temp\pip-record-5ebwe65m\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\dl-3d\gridding_residual_network\include\site\python3.7\OpenEXR' Check the logs for full c
ommand output.
我无法解决问题。我使用的是 python 3.7。请提出一个可能的解决方案。