windows安装gcc

完整报错:

RuntimeError: Error building extension 'fused': [1/3] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\lib\x64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin;\bin\nvcc --generate-dependencies-with-compile --dependency-output fused_bias_act_kernel.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Anaconda\SetUpPath\envs\Pytorch\lib\site-packages\torch\include -ID:\Anaconda\SetUpPath\envs\Pytorch\lib\site-packages\torch\include\torch\csrc\api\include -ID:\Anaconda\SetUpPath\envs\Pytorch\lib\site-packages\torch\include\TH -ID:\Anaconda\SetUpPath\envs\Pytorch\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\lib\x64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin;\include" -ID:\Anaconda\SetUpPath\envs\Pytorch\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c d:\Python\Python_Demo\虚拟换衣\Projects\11、pose-with-style-main\op\fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o

FAILED: fused_bias_act_kernel.cuda.o

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\lib\x64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin;\bin\nvcc --generate-dependencies-with-compile --dependency-output fused_bias_act_kernel.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -ID:\Anaconda\SetUpPath\envs\Pytorch\lib\site-packages\torch\include -ID:\Anaconda\SetUpPath\envs\Pytorch\lib\site-packages\torch\include\torch\csrc\api\include -ID:\Anaconda\SetUpPath\envs\Pytorch\lib\site-packages\torch\include\TH -ID:\Anaconda\SetUpPath\envs\Pytorch\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\lib\x64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin;\include" -ID:\Anaconda\SetUpPath\envs\Pytorch\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -c d:\Python\Python_Demo\虚拟换衣\Projects\11、pose-with-style-main\op\fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o 

CreateProcess failed: The system cannot find the file specified.
ninja: fatal: ReadFile: 句柄无效。

解决方案:

1、下载MinGW(MinGW - Minimalist GNU for Windows download | SourceForge.net)并安装

2、添加环境变量(系统变量中的Path)

 3、win+R 打开cmd,输入mingw-get,弹出

4、在cmd中输入mingw-get install gcc 来安装gcc ,如果想安装 g++,gdb,只要输入命令 mingw-get install g++ 和 mingw-get install gdb

 5、查看gcc版本gcc -v

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值