detectron2 icon indicating copy to clipboard operation
detectron2 copied to clipboard

Build error

Open EnricoBeltramo opened this issue 4 years ago • 5 comments

I tried to compile under win10, Vs2019, but no way to work. I have always follow error: error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe' failed with exit status 2

withc version of compiler needs to use for a correct build?

EnricoBeltramo avatar May 28 '20 13:05 EnricoBeltramo

I tried to compile under win10, Vs2015, but no way to work. error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1

byq-luo avatar Jun 12 '20 10:06 byq-luo

I tried to compile under win10, Vs2019, but no way to work. I have always follow error: error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe' failed with exit status 2 withc version of compiler needs to use for a correct build?

I also got the same error.

alvinhu avatar Jun 19 '20 19:06 alvinhu

To install it under windows I did:

  • created a virtual env conda with python 3.7 with follow versions of torch: conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
  • I installed pycocotools from here: pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
  • removed in setup the dipendences from pycoocotools (otherwise try to reinstall if)
  • installed visual studio C++ build tools v1.40
  • copied nms_rotated_cuda.cu as version for windows (should be used as full replacement, but is not aligned as actual version): https://github.com/conansherry/detectron2
  • make changes in torch files as specified in issue: https://github.com/facebookresearch/detectron2/issues/9 after that, I correctly build and installed (from local copy)

EnricoBeltramo avatar Jun 28 '20 16:06 EnricoBeltramo

I tried to compile under win10, Vs2019, but no way to work. I have always follow error: error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe' failed with exit status 2 withc version of compiler needs to use for a correct build?

I also got the same error.

Got it working eventually? Been trying for several hours to get detectron2 to compile but there always are a bunch of errors. Already tried 5 different compilers... Any idea on the exact compiler and dependency versions?

Tomiha avatar Sep 09 '20 14:09 Tomiha

To install it under windows I did:

* created a virtual env conda with python 3.7 with follow versions of torch:
  conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch

* I installed pycocotools from here:
  pip install git+[https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI](https://github.com/philferriere/cocoapi.git#egg=pycocotools%5E&subdirectory=PythonAPI)

* removed in setup the dipendences from pycoocotools (otherwise try to reinstall if)

* installed visual studio C++ build tools v1.40

* copied nms_rotated_cuda.cu as version for windows (should be used as full replacement, but is not aligned as actual version):
  https://github.com/conansherry/detectron2

* make changes in torch files as specified in issue:
  [facebookresearch/detectron2#9](https://github.com/facebookresearch/detectron2/issues/9)
  after that, I correctly build and installed (from local copy)

Hey,

what exactly do you mean with 'visual studio C++ build tools v1.40', are you referring to MSVC v140 - VS2015 Build Tools (v14.0) ?

Tomiha avatar Sep 09 '20 14:09 Tomiha