conansherry / detectron2

detectron2 windows build
Apache License 2.0
223 stars 54 forks source link

Detectron2 could not find MSVC compiler during build. #20

Closed zerovirus123 closed 3 years ago

zerovirus123 commented 3 years ago

Hi there, thank you for your detectron2 implementation.

I am trying to build the project in my conda environment. However, I encountered this error.

running build
running build_py
running build_ext
min version:  (19, 0, 24215)
cl
C:\Users\Deployment\.conda\envs\sliding_windows_py37_copy\lib\site-packages\torch\utils\cpp_extension.py:239: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
  warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error))

It seems like the code could not locate the MSVC compiler. I am using Microsoft Visual Studios 2019 so I know that there is a functional compiler.

Below are my build settings.

    Python: 3.7
    CUDA: 10.1
    PyTorch: 1.6.0
    Torchvision: 0.7.0
    Microsoft Visual Studio: 2019