NVlabs / nvdiffrec

Official code for the CVPR 2022 (oral) paper "Extracting Triangular 3D Models, Materials, and Lighting From Images".
Other
2.09k stars 222 forks source link

Error when running sample spot.json #50

Closed mexicantexan closed 2 years ago

mexicantexan commented 2 years ago

Has anyone else gotten a RuntimeError when attempting to run the sample code given in the setup?

I get:

RuntimeError: Error building extension 'nvdiffrast_plugin': [1/1] "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64/link.exe" common.o glutil.o rasterize.cuda.o rasterize.o int
erpolate.cuda.o texture.cuda.o texture.o antialias.cuda.o torch_bindings.o torch_rasterize.o torch_interpolate.o torch_texture.o torch_antialias.o /nologo /DLL /LIBPATH:D:\Download\nvdiffrec\venv\lib\site-packages\nvdiffrast\torch\.
.\lib /DEFAULTLIB:gdi32 /DEFAULTLIB:opengl32 /DEFAULTLIB:user32 /DEFAULTLIB:setgpu c10.lib c10_cuda.lib torch_cpu.lib torch_cuda_cu.lib -INCLUDE:?_torch_cuda_cu_linker_symbol_op_cuda@native@at@@YA?AVTensor@2@AEBV32@@Z torch_cuda_cpp
.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Download\nvdiffrec\venv\lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Download\nvdiffrec\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Tool
kit\CUDA\v11.7\lib/x64" cudart.lib /out:nvdiffrast_plugin.pyd
FAILED: nvdiffrast_plugin.pyd
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64/link.exe" common.o glutil.o rasterize.cuda.o rasterize.o interpolate.cuda.o texture.cuda.o texture.o antialias.cuda.o torch_bi
ndings.o torch_rasterize.o torch_interpolate.o torch_texture.o torch_antialias.o /nologo /DLL /LIBPATH:D:\Download\nvdiffrec\venv\lib\site-packages\nvdiffrast\torch\..\lib /DEFAULTLIB:gdi32 /DEFAULTLIB:opengl32 /DEFAULTLIB:user32 /D
EFAULTLIB:setgpu c10.lib c10_cuda.lib torch_cpu.lib torch_cuda_cu.lib -INCLUDE:?_torch_cuda_cu_linker_symbol_op_cuda@native@at@@YA?AVTensor@2@AEBV32@@Z torch_cuda_cpp.lib -INCLUDE:?warp_size@cuda@at@@YAHXZ torch.lib /LIBPATH:D:\Down
load\nvdiffrec\venv\lib\site-packages\torch\lib torch_python.lib /LIBPATH:D:\Download\nvdiffrec\venv\Scripts\libs "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\lib/x64" cudart.lib /out:nvdiffrast_plugin.pyd
LINK : fatal error LNK1104: cannot open file 'python39.lib'
ninja: build stopped: subcommand failed.

A full printout of the error is attached: nvdiffrec-error-printout.txt

mexicantexan commented 2 years ago

Ended up getting it to work by copying the folder libs from where Python39 was installed into venv/Scripts