GroundingDINO icon indicating copy to clipboard operation
GroundingDINO copied to clipboard

ERROR: Failed building wheel for groundingdino

Open RAF3DA opened this issue 1 year ago • 1 comments

Error in building wheels for grounding dino using-- pip install git+https://github.com/IDEA-Research/GroundingDINO.git

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include\crt/host_config.h(153): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. cuda_version.cu

The error says incorrect compiler?

Cuda version-11.8 python-3.8 MSVS 2022

RAF3DA avatar Oct 17 '24 08:10 RAF3DA

I've encountered a similar issue, with Cuda v12.1 and Visual Studio v17.x. In my case, it's because my Visual Studio version is too advanced for Cuda 12.1, which only support up to Visual Studio 2022 17.0 (not 17.x). In your case, I think you should compare your Visual Studio version number with this "Table 2. Windows Compiler Support in CUDA 11.8" on "Cuda 11.8 Installation Guide" (https://docs.nvidia.com/cuda/archive/11.8.0/cuda-installation-guide-microsoft-windows/index.html).

You can download and install Visual Studio 17.0 Build Tools at "Visual Studio 2022 Release History"(https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history#fixed-version-bootstrappers).

我遇到了相同的问题,原因是当前Cuda版本(v12.1)仅支持Visual Studio版本v17.0,不支持我的Visual Studio版本(v17.x)。需要对照对应版本Cuda文档的《安装指南》(Installation Guide)中的表格“Table 2. Windows Compiler Support in CUDA [version]”下载并安装该版本Cuda所支持的Visual Studio Build Tools版本。所需的VS旧版本安装包可以在微软官网的“Visual Studio Realease History”页面上找到(https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history#fixed-version-bootstrappers))。

superVariant avatar Apr 12 '25 03:04 superVariant