conansherry / detectron2

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

Build error #13

Open EnricoBeltramo opened 4 years ago

EnricoBeltramo commented 4 years ago

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?

byq-luo commented 4 years ago

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

alvinhu commented 4 years ago

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.

EnricoBeltramo commented 4 years ago

To install it under windows I did:

Tomiha commented 3 years ago

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 commented 3 years ago

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) ?