question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting Error: Failed building wheel for mmcv-full

See original GitHub issue

I tried to install mmcv-full on a system with Windows 10.

The system comes with cuda 11.3 and pytorch 11.1 . The pytorch is installed under conda environment with the syntaxt conda install -n test pytorch==1.11.0 torchvision torchaudio -c pytorch

The following line was used to install the mmcv-full pip install mmcv-full==1.5.3 -f https://download.openmmlab.com/mmcv/dist/cu113/torch11.1/index.html

However, in the middle of the installation, the compiler return

 copying mmcv\ops\csrc\tensorrt\plugins\trt_roi_align_kernel.cu -> build\lib.win-amd64-3.8\mmcv\ops\csrc\tensorrt\
plugins
  copying mmcv\ops\csrc\tensorrt\plugins\trt_scatternd.cpp -> build\lib.win-amd64-3.8\mmcv\ops\csrc\tensorrt\plugins
  copying mmcv\ops\csrc\tensorrt\plugins\trt_scatternd_kernel.cu -> build\lib.win-amd64-3.8\mmcv\ops\csrc\tensorrt\
plugins
  running build_ext
  C:\Users\rpb\anaconda3\envs\test\lib\site-packages\torch\utils\cpp_extension.py:322: UserWarning: Error checking 
compiler version for cl: [WinError 2] The system cannot find the file specified
    warnings.warn(f'Error checking compiler version for {compiler}: {error}')
  building 'mmcv._ext' extension
  creating build\temp.win-amd64-3.8
  creating build\temp.win-amd64-3.8\Release
  creating build\temp.win-amd64-3.8\Release\mmcv
  creating build\temp.win-amd64-3.8\Release\mmcv\ops
  creating build\temp.win-amd64-3.8\Release\mmcv\ops\csrc
  creating build\temp.win-amd64-3.8\Release\mmcv\ops\csrc\pytorch
  creating build\temp.win-amd64-3.8\Release\mmcv\ops\csrc\pytorch\cpu
  creating build\temp.win-amd64-3.8\Release\mmcv\ops\csrc\pytorch\cuda
  "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe"
 /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DMMCV_WITH_CUDA -IC:\Users\rpb\AppData\Local\Temp\pip-install-ho03yw5v\mmcv-f
ull_30122287b7064130b2983914081f85d6\mmcv\ops\csrc\common -IC:\Users\rpb\AppData\Local\Temp\pip-install-ho03yw5v\mm
cv-full_30122287b7064130b2983914081f85d6\mmcv\ops\csrc\common\cuda -IC:\Users\rpb\anaconda3\envs\test\lib\site-pack
ages\torch\include -IC:\Users\rpb\anaconda3\envs\test\lib\site-packages\torch\include\torch\csrc\api\include -IC:\U
sers\rpb\anaconda3\envs\test\lib\site-packages\torch\include\TH -IC:\Users\rpb\anaconda3\envs\test\lib\site-package
s\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\rpb\anaconda3\e
nvs\test\include -IC:\Users\rpb\anaconda3\envs\test\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\
BuildTools\VC\Tools\MSVC\14.32.31326\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTo
ols\VC\Tools\MSVC\14.32.31326\include" /EHsc /Tp./mmcv/ops/csrc/pytorch/cpu\active_rotated_filter.cpp /Fobuild\temp
.win-amd64-3.8\Release\./mmcv/ops/csrc/pytorch/cpu\active_rotated_filter.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /w
d4275 /wd4018 /wd4190 /EHsc -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 
  active_rotated_filter.cpp
  C:\Users\rpb\anaconda3\envs\test\lib\site-packages\torch\include\c10/core/Allocator.h(3): fatal error C1083: Cann
ot open include file: 'stddef.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\
\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for mmcv-full

For context, the c++ development has been install as shown in the figure.

Snap 2022-07-06 at 08 14 01

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zhouzaidacommented, Jul 6, 2022

You can install mmcv-full via openmim.

pip install -U openmim
mim install mmcv-full
0reactions
balandongivcommented, Jul 11, 2022

Thanks for responding @zhouzaida,really appreciate. I downgrade the cuda to 11.6 and using pytorch 11.6 instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR: Failed building wheel for mmcv-full #1055 - GitHub
Describe the Issue Tried to create a new environment with mmcv tutorial but failed with both pip install and build from source.
Read more >
errors when installing mmcv - Stack Overflow
Running setup.py install for mmcv-full ... error ERROR: Command errored out with exit status 1: command: /root/miniconda3/bin/python -u -c ...
Read more >
Building wheel for mmcv-full (setup.py) ... error和OSError
Failed to build mmcv-full Installing collected packages: mmcv-full Running setup.py install for mmcv-full ... error ERROR: Command errored ...
Read more >
Build MMCV from source
Before installing mmcv-full, make sure that PyTorch has been successfully ... If no error is reported by the above command, the installation is...
Read more >
mmcv-full - PyPI
mmcv -full 1.7.0. pip install mmcv-full. Copy PIP instructions. Latest version. Released: Nov 3, 2022. OpenMMLab Computer Vision Foundation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found