Today I was very frustrated. To configure the environment required for mmdetection, I really went through a lot of trouble. Here’s a record of an error that kept me stuck.

    cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-ID:\Program Files\anaconda\envs\open_mmlab\lib\site-packages\numpy\core\include" "-ID:\Program Files\anaconda\envs\open_mmlab\include" "-ID:\Program Files\anaconda\envs\open_mmlab\include" /EHsc /Tp./mmcv/video/optflow_warp/flow_warp.cpp /Fobuild\temp.win-amd64-3.7\Release\./mmcv/video/optflow_warp/flow_warp.obj
    error: command 'cl.exe' failed: No such file or directory

That’s weird. Why would it report an error that cl.exe cannot be found? I installed Visual Studio Tool???

After searching online for a while, there was no solution.

Later, suddenly, when I accidentally ran the installation command without activating… I found… it worked???

It turned out to be Anaconda’s fault.

So I searched online about this issue for a while and found that the principle is actually very simple - there’s no Cpython in the Anaconda environment. So:

pip install cpython

Solved it.