nvcc fatal : Cannot find compiler 'cl.exe' in PATH
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\torch\utils\cpp_extension.py", line 1672, in _run_ninja_build
env=env)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "setup.py", line 202, in
cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
_build_ext.run(self)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\torch\utils\cpp_extension.py", line 709, in build_extensions
build_ext.build_extensions(self)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\distutils\command\build_ext.py", line 534, in build_extension
depends=ext.depends)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\torch\utils\cpp_extension.py", line 691, in win_wrap_ninja_compile
with_cuda=with_cuda)
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\torch\utils\cpp_extension.py", line 1360, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "D:\ProgramData\Anaconda3\envs\detectron2\lib\site-packages\torch\utils\cpp_extension.py", line 1682, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
@刘看山