HAC icon indicating copy to clipboard operation
HAC copied to clipboard

Building wheel for gridencoder (setup.py) ... error

Open BeckyWang0222 opened this issue 1 year ago • 5 comments

Hello! This is a great job! I found such a problem during the replication process. How can I solve it?

Building wheel for gridencoder (setup.py) ... error

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for gridencoder Running setup.py clean for gridencoder Failed to build gridencoder ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (gridencoder)

BeckyWang0222 avatar Jul 15 '24 02:07 BeckyWang0222

Hi, do you have full log for this error?

I recommend you use the same cuda and gcc version as ours. (ie, cuda 11.8, gcc 9.4.0)

YihangChen-ee avatar Jul 15 '24 02:07 YihangChen-ee

I have the same issue, i figure it out by changing the setup.py in the gridencoder I change the c++14 to c++17. My cuda is 12.4 and pip install torchaudio==2.1.0+cu121 torchvision==0.16.0+cu121 --index-url https://download.pytorch.org/whl/cu121 setup I make this change because I see home/liujiahang/miniconda3/envs/HAC_env/lib/python3.10/site-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch /home/liujiahang/miniconda3/envs/HAC_env/lib/python3.10/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: C++17 or later compatible compiler is required to use PyTorch. This means that I need the C++ version greater than or equal to 17

2003jiahang avatar Aug 19 '24 03:08 2003jiahang

@Shell0222

2003jiahang avatar Aug 19 '24 03:08 2003jiahang

I have the same issue, i figure it out by changing the setup.py in the gridencoder I change the c++14 to c++17. My cuda is 12.4 and pip install torchaudio==2.1.0+cu121 torchvision==0.16.0+cu121 --index-url https://download.pytorch.org/whl/cu121 setup I make this change because I see home/liujiahang/miniconda3/envs/HAC_env/lib/python3.10/site-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch /home/liujiahang/miniconda3/envs/HAC_env/lib/python3.10/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: C++17 or later compatible compiler is required to use PyTorch. This means that I need the C++ version greater than or equal to 17

Works for me.

Torch 2.4.1+cu121 gcc 11.4

Matt-V50 avatar Nov 15 '24 23:11 Matt-V50

Run into this error too. But mine is solved by changing the Microsoft Visual Studio path of setup.py line 21 into my actual location where Visual Studio is installed as below:

Image

By the way, I configured the environment on Windows.

AmaoLearning avatar Apr 29 '25 11:04 AmaoLearning