#3329·mmcv

[Bug] win10 cuda12.8 pytorch2.11 error when installing mmcv2.1.0

Author: FreemanTangCreated Apr 15, 2026Updated Jul 1, 2026

Prerequisite

Environment

[59/136] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\bin\nvcc -MD -MF .\mmcv\build\temp.win-amd64-3.10\Release\mmcv/ops/csrc/pytorch/cuda\filtered_lrelu.obj.d -std=c++17 -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /wd4624 -Xcompiler /wd4067 -Xcompiler /wd4068 -Xcompiler /EHsc --use-local-env -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -DMMCV_WITH_CUDA -I.\mmcv\mmcv\ops\csrc\pytorch -I.\mmcv\mmcv\ops\csrc\common -I.\mmcv\mmcv\ops\csrc\common\cuda -I.\mmseg_cu128_env\lib\site-packages\torch\include -I.\mmseg_cu128_env\lib\site-packages\torch\include\torch\csrc\api\include "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\include" -I.\mmseg_cu128_env\include -I.\py310_env\include -I.\py310_env\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\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\shared" "-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\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c .\mmcv\mmcv\ops\csrc\pytorch\cuda\filtered_lrelu.cu -o .\mmcv\build\temp.win-amd64-3.10\Release\mmcv/ops/csrc/pytorch/cuda\filtered_lrelu.obj -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75
  filtered_lrelu.cu
  tmpxft_00005c10_00000000-7_filtered_lrelu.cudafe1.cpp
  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File ".\mmseg_cu128_env\lib\site-packages\torch\\\utils\cpp_extension.py", line 2774, in _run_ninja_build
      subprocess.run(
    File ".\py310_env\lib\subprocess.py", line 526, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '15']' returned non-zero exit status 2.

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File ".\mmseg_cu128_env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
      main()
    File ".\mmseg_cu128_env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
    File ".\mmseg_cu128_env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 280, in build_wheel
      return _build_backend().build_wheel(
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\build_meta.py", line 230, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\build_meta.py", line 215, in _build_with_temp_dir
      self.run_setup()
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\build_meta.py", line 267, in run_setup
      super(_BuildMetaLegacyBackend,
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 448, in <module>
      setup(
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\__init__.py", line 155, in setup
      return distutils.core.setup(**attrs)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
      return run_commands(dist)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
      dist.run_commands()
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
      self.run_command(cmd)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
      cmd_obj.run()
    File ".\mmseg_cu128_env\lib\site-packages\wheel\_bdist_wheel.py", line 390, in run
      self.run_command("build")
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
      cmd_obj.run()
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
      cmd_obj.run()
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
      _build_ext.run(self)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 339, in run
      self.build_extensions()
    File ".\mmseg_cu128_env\lib\site-packages\torch\\\utils\cpp_extension.py", line 1184, in build_extensions
      build_ext.build_extensions(self)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 448, in build_extensions
      self._build_extensions_serial()
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 473, in _build_extensions_serial
      self.build_extension(ext)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\command\build_ext.py", line 202, in build_extension
      _build_ext.build_extension(self, ext)
    File ".\mmseg_cu128_env\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 528, in build_extension
      objects = self.compiler.compile(sources,
    File ".\mmseg_cu128_env\lib\site-packages\torch\\\utils\cpp_extension.py", line 1153, in win_wrap_ninja_compile
      _write_ninja_file_and_compile_objects(
    File ".\mmseg_cu128_env\lib\site-packages\torch\\\utils\cpp_extension.py", line 2361, in _write_ninja_file_and_compile_objects
      _run_ninja_build(
    File ".\mmseg_cu128_env\lib\site-packages\torch\\\utils\cpp_extension.py", line 2791, in _run_ninja_build
      raise RuntimeError(message) from e
  RuntimeError: Error compiling objects for extension
  error: subprocess-exited-with-error

  × Building wheel for mmcv (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> No available output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: '.\mmseg_cu128_env\Scripts\python.exe' '.\mmseg_cu128_env\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' build_wheel 'C:\Users\6785\AppData\Local\Temp\tmpirgry9qm'
  cwd: .\mmcv
  Building wheel for mmcv (pyproject.toml) ... error
  ERROR: Failed building wheel for mmcv
Failed to build mmcv
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> mmcv

Dear gentlemen, please give me some advice. I compiled it well before, but I got an error here. Don't know the reason and no solution.

When will the official release a precompiled wheel file suitable for win and linux cuda12.8 pytorch2.8+?

Reproduces the problem - code sample

.

Reproduces the problem - command or script

bash
git clone https://github.com/open-mmlab/mmcv.git
cd mmcv
git checkout v2.1.0
pip install -v --no-build-isolation .

Reproduces the problem - error message

.

Additional information