muelea / shapy

CVPR 2022 - Official code repository for the paper: Accurate 3D Body Shape Regression using Metric and Semantic Attributes.
https://shapy.is.tue.mpg.de/
295 stars 44 forks source link

[Windows] Solved problem(mesh-mesh-intersection) #49

Closed bbungsang94 closed 1 month ago

bbungsang94 commented 2 months ago

To Windows users, I hope this post proves helpful. I recently became aware of issues specific to Windows users and wanted to share my expertise.

The focus of this post is on the MSVC compiler environment variables, without altering the contents of setup.py.

I tested in CUDA 12.1 with PyTorch 2.3.0. Compare my environment variables with yours below.

CUDA_SAMPLES_INC=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\CUDA-SAMPLES\Common CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1

There aren't any significant differences from here on. After installing VS2022 Community, I separately ran my command prompt window and called vcvars64.bat (usually located at 2022/Community/VC/Auxiliary/Build). For more details, please refer to the link below.

https://github.com/NVlabs/tiny-cuda-nn/issues/280

If running vcvars64.bat still doesn't resolve the issue (even after rebooting), add the following paths to the environment variable PATH:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64 C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\lib\x64

I'm not entirely sure why, but my environment variables also include the following two paths (Windows Kit). It seems like a good idea to include them, possibly because they were encountered during the implementation of another project.

"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\ucrt\x64" "C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt"

This post is for Windows users experiencing setup issues with mesh-mesh intersection. Furthermore, it serves as a helpful guide for users encountering messages indicating the absence of the "cl" compiler during the "build_ext" stage, or facing problems during compilation where "crtdefs" or "cstddef" cannot be found. I haven't encountered any other issues myself.

temp