IrisRainbowNeko/genshin_auto_fish

安装yolox时报错:cl.exe' failed with exit code 2

junguoqianshan opened this issue · 1 comments

C:\Windows\System32\genshin_auto_fish>python setup.py develop
running develop
running egg_info
writing yolox.egg-info\PKG-INFO
writing dependency_links to yolox.egg-info\dependency_links.txt
writing top-level names to yolox.egg-info\top_level.txt
C:\Users\Grove Yo\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py:369: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'yolox.egg-info\SOURCES.txt'
writing manifest file 'yolox.egg-info\SOURCES.txt'
running build_ext
C:\Users\Grove Yo\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py:304: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'yolox._C' extension
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Windows\System32\genshin_auto_fish\yolox\layers\csrc -IC:\Users\Grove Yo\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\include -IC:\Users\Grove Yo\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Grove Yo\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\include\TH -IC:\Users\Grove Yo\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\include\THC -IC:\Users\Grove Yo\AppData\Local\Programs\Python\Python39\include -IC:\Users\Grove Yo\AppData\Local\Programs\Python\Python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /TpC:\Windows\System32\genshin_auto_fish\yolox\layers\csrc\cocoeval\cocoeval.cpp /Fobuild\temp.win-amd64-3.9\Release\Windows\System32\genshin_auto_fish\yolox\layers\csrc\cocoeval\cocoeval.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
cl: 命令行 warning D9002 :忽略未知选项“-O3”
cocoeval.cpp
c1xx: fatal error C1083: 无法打开源文件: “C:\Windows\System32\genshin_auto_fish\yolox\layers\csrc\cocoeval\cocoeval.cpp”: No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe' failed with exit code 2

已解决