Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while installing detectron2 on Windows | Pytorch :1.5 | CUDA :10.1 #1494

Closed
veer5551 opened this issue May 29, 2020 · 3 comments
Closed
Labels
invalid/unrelated unrelated to this project or invalid type of issues

Comments

@veer5551
Copy link

Instructions To Reproduce the Issue:

  1. what changes you made (git diff) or what code you wrote
No change.
  1. what exact command you run:
    pip install -e .
    inside the detectron2 directory as mentioned in this blog.
    https://gilberttanner.com/blog/detectron-2-object-detection-with-pytorch

  2. what you observed (including full logs):

  Running setup.py develop for detectron2
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\msjmf59\\Documents\\Projects\\Auto_Labelling\\Models\\Pytorch\\detectron2\\setup.py'"'"'; __file__='"'"'C:\\Users\\msjmf59\\Documents\\Projects\\Auto_Labelling\\Models\\Pytorch\\detectron2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\detectron2\
    Complete output (16 lines):
    running develop
    running egg_info
    writing detectron2.egg-info\PKG-INFO
    writing dependency_links to detectron2.egg-info\dependency_links.txt
    writing requirements to detectron2.egg-info\requires.txt
    writing top-level names to detectron2.egg-info\top_level.txt
    reading manifest file 'detectron2.egg-info\SOURCES.txt'
    writing manifest file 'detectron2.egg-info\SOURCES.txt'
    running build_ext
    building 'detectron2._C' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -IC:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\detectron2\detectron2\layers\csrc -IC:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\lib\site-packages\torch\include -IC:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\lib\site-packages\torch\include\TH -IC:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -IC:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\include -IC:\Python37\include -IC:\Python37\include "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" -IC:\PROGRA~1\IBM\SQLLIB\INCLUDE -IC:\PROGRA~1\IBM\SQLLIB\LIB /EHsc /TpC:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\detectron2\detectron2\layers\csrc\vision.cpp /Fobuild\temp.win-amd64-3.7\Release\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\detectron2\detectron2\layers\csrc\vision.obj /MD /wd4819 /EHsc -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
    vision.cpp
    C:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\lib\site-packages\torch\include\torch\csrc\api\include\torch/cuda.h(5): fatal error C1083: Cannot open include file: 'cstddef': No such file or directory
    C:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\lib\site-packages\torch\utils\cpp_extension.py:304: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
      warnings.warn(msg.format('we could not find ninja.'))
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\msjmf59\Documents\VirtualEnvironments\pytorch_gpu2\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\msjmf59\\Documents\\Projects\\Auto_Labelling\\Models\\Pytorch\\detectron2\\setup.py'"'"'; __file__='"'"'C:\\Users\\msjmf59\\Documents\\Projects\\Auto_Labelling\\Models\\Pytorch\\detectron2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
  1. please simplify the steps as much as possible so they do not require additional resources to
    run, such as a private dataset.

I tried it twice with new environments. Still the same error

Environment:

Provide your environment information using the following command:

Collecting environment information...
PyTorch version: 1.5.0+cu101
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Microsoft Windows 10 Enterprise
GCC version: Could not collect
CMake version: version 3.15.3

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.1.243
GPU models and configuration: GPU 0: Quadro P1000
Nvidia driver version: 426.25
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\cudnn64_7.dll

Versions of relevant libraries:
[pip3] numpy==1.18.4
[pip3] torch==1.5.0+cu101
[pip3] torchvision==0.6.0+cu101
[conda] Could not collect

If your issue looks like an installation issue / environment issue,
please first try to solve it yourself with the instructions in
https://detectron2.readthedocs.io/tutorials/install.html#common-installation-issues

@ppwwyyxx
Copy link
Contributor

According to https://detectron2.readthedocs.io/tutorials/install.html we do not provide support for windows.

@ppwwyyxx ppwwyyxx added the invalid/unrelated unrelated to this project or invalid type of issues label May 29, 2020
@honeytidy
Copy link

I am getting this same error too. But it works when swith my pytorch to 1.4.0.

@veer5551
Copy link
Author

veer5551 commented Jun 2, 2020

Hey @honeytidy,

You may want to have a look at this discussion for Pytorch 1.5 + CUDA 10.1 with VS2019
conansherry/detectron2#2

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid/unrelated unrelated to this project or invalid type of issues
Projects
None yet
Development

No branches or pull requests

3 participants