报错1:error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
解决方案:visual c++ build tools的安装与使用 https://blog.csdn.net/u012247418/article/details/82314129
报错2:
安装ninja:Windows 10 x64下编译安装ninja https://blog.csdn.net/discoverer100/article/details/101574807
报错3:subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
解决方案:https://www.cnblogs.com/yunshangyue71/p/13230575.html
报错4: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1181
(track_env) E:\code\07_FairMOT-master\DCNv2>python setup.py build develop which: no hipcc in (/cygdrive/d/04_anaconda/anaconda/envs/track_env/lib/site-packages/torch/lib:/bin:/cygdrive/d/04_anaconda/anaconda/envs/track_env:/mingw-w64/bin:/usr/bin:/bin:/cygdrive/d/04_anaconda/anaconda/envs/track_env/Scripts:/cygdrive/d/04_anaconda/anaconda/envs/track_env/bin:/cygdrive/d/04_anaconda/anaconda/condabin:/cygdrive/d/06_python/Scripts:/cygdrive/d/06_python:/cygdrive/d/04_anaconda/anaconda:/cygdrive/d/04_anaconda/anaconda/Library/mingw-w64/bin:/cygdrive/d/04_anaconda/anaconda/Library/usr/bin:/cygdrive/d/04_anaconda/anaconda/Library/bin:/cygdrive/d/04_anaconda/anaconda/Scripts:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/OpenSSH:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/cygdrive/c/local/Ninja:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin:/cygdrive/d/12_mingw32/mingw32/bin:/cygdrive/c/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/ucrt:/cygdrive/c/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared:/cygdrive/c/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64:/cygdrive/c/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/ucrt/x64:/cygdrive/c/Program Files (x86)/Windows Kits/10/bin/10.0.16299.0/x64:/cygdrive/c/Users/DELL/AppData/Local/Microsoft/WindowsApps:.) running build running build_ext D:\04_anaconda\anaconda\envs\track_env\lib\site-packages\torch\utils\cpp_extension.py:244: UserWarning: !! WARNING !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (cl 19.00.24210) may be ABI-incompatible with PyTorch! Please use a compiler that is ABI-compatible with GCC 5.0 and above. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html. See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6 for instructions on how to install GCC 5 or higher. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! WARNING !! warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler)) building '_ext' extension Emitting ninja build file E:\code\07_FairMOT-master\DCNv2\build\temp.win-amd64-3.8\Release\build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) 1.9.0 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\04_anaconda\anaconda\envs\track_env\lib\site-packages\torch\lib /LIBPATH:D:\04_anaconda\anaconda\envs\track_env\libs /LIBPATH:D:\04_anaconda\anaconda\envs\track_env\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64" c10.lib torch.lib torch_cpu.lib torch_python.lib /EXPORT:PyInit__ext E:\code\07_FairMOT-master\DCNv2\build\temp.win-amd64-3.8\Release\code\07_FairMOT-master\DCNv2\src\vision.obj E:\code\07_FairMOT-master\DCNv2\build\temp.win-amd64-3.8\Release\code\07_FairMOT-master\DCNv2\src\cpu\dcn_v2_cpu.obj E:\code\07_FairMOT-master\DCNv2\build\temp.win-amd64-3.8\Release\code\07_FairMOT-master\DCNv2\src\cpu\dcn_v2_im2col_cpu.obj E:\code\07_FairMOT-master\DCNv2\build\temp.win-amd64-3.8\Release\code\07_FairMOT-master\DCNv2\src\cpu\dcn_v2_psroi_pooling_cpu.obj /OUT:build\lib.win-amd64-3.8_ext.cp38-win_amd64.pyd /IMPLIB:E:\code\07_FairMOT-master\DCNv2\build\temp.win-amd64-3.8\Release\code\07_FairMOT-master\DCNv2\src_ext.cp38-win_amd64.lib LINK : fatal error LNK1181: 无法打开输入文件“E:\code\07_FairMOT-master\DCNv2\build\temp.win-amd64-3.8\Release\code\07_FairMOT-master\DCNv2\src\vision.obj” error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\link.exe' failed with exit status 1181
解决方案:降低torch版本为1.2
报错5:ModuleNotFoundError: No module named 'cython_bbox'
解决方案:Win10 安装 cython-bbox https://blog.csdn.net/qq_19707521/article/details/106692395
把解压文件放到 D:\04_anaconda\anaconda\envs\track_env_torch1.2\Lib\site-packages
然后进入目录文件执行 python setup.py build_ext install
报错6:urllib.error.HTTPError: HTTP Error 404: Not Found
报错7:RuntimeError: Not compiled with GPU support (dcn_v2_forward at E:\code\07_FairMOT-master\DCNv2\src\dcn_v2.h:35)
(no backtrace available)
解决方案:重新从git上把DCN2v拉下来,进行编译
1.安装 conda install -c pytorch pytorch-nightly cudatoolkit=10.1 (cudatoolkit一定要指定对应的版本)
2.进入DCN2v的根目录
3.构建 python setup.py build develop
4.测试看看是否构建成功 python testcuda.py