Install detectron2 on ubuntu18.04 setup.py with error
See original GitHub issueInstructions To Reproduce the Bug:
- Full runnable code or full changes you made:
git clone https://github.com/facebookresearch/detectron2.git
python -m pip install -e detectron2
- What exact command you run:
conda create -n instanceseg python=3.7
conda activate instanceseg
conda install pytorch torchvision
git clone https://github.com/facebookresearch/detectron2.git
python -m pip install -e detectron2
- Full logs or other relevant observations:
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Obtaining file:///home/sungd/detectron2
Requirement already satisfied: termcolor>=1.1 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (1.1.0)
Requirement already satisfied: Pillow>=7.1 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (8.2.0)
Requirement already satisfied: yacs>=0.1.6 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (0.1.8)
Requirement already satisfied: tabulate in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (0.8.9)
Requirement already satisfied: cloudpickle in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (1.6.0)
Requirement already satisfied: matplotlib in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (3.4.1)
Requirement already satisfied: tqdm>4.29.0 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (4.60.0)
Requirement already satisfied: tensorboard in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (2.4.1)
Requirement already satisfied: fvcore<0.1.6,>=0.1.5 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (0.1.5.post20210410)
Requirement already satisfied: iopath<0.1.8,>=0.1.7 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (0.1.7)
Requirement already satisfied: pycocotools>=2.0.2 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (2.0.2)
Requirement already satisfied: future in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (0.18.2)
Requirement already satisfied: pydot in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (1.4.2)
Requirement already satisfied: omegaconf==2.1.0.dev22 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from detectron2==0.4) (2.1.0.dev22)
Requirement already satisfied: PyYAML>=5.1.* in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from omegaconf==2.1.0.dev22->detectron2==0.4) (5.4.1)
Requirement already satisfied: antlr4-python3-runtime==4.8 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from omegaconf==2.1.0.dev22->detectron2==0.4) (4.8)
Requirement already satisfied: numpy in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from fvcore<0.1.6,>=0.1.5->detectron2==0.4) (1.19.2)
Requirement already satisfied: portalocker in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from iopath<0.1.8,>=0.1.7->detectron2==0.4) (2.3.0)
Requirement already satisfied: setuptools>=18.0 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from pycocotools>=2.0.2->detectron2==0.4) (52.0.0.post20210125)
Requirement already satisfied: cython>=0.27.3 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from pycocotools>=2.0.2->detectron2==0.4) (0.29.22)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from matplotlib->detectron2==0.4) (2.8.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from matplotlib->detectron2==0.4) (0.10.0)
Requirement already satisfied: pyparsing>=2.2.1 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from matplotlib->detectron2==0.4) (2.4.7)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from matplotlib->detectron2==0.4) (1.3.1)
Requirement already satisfied: six in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from cycler>=0.10->matplotlib->detectron2==0.4) (1.15.0)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (1.8.0)
Requirement already satisfied: protobuf>=3.6.0 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (3.15.8)
Requirement already satisfied: requests<3,>=2.21.0 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (2.25.1)
Requirement already satisfied: google-auth<2,>=1.6.3 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (1.28.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (0.4.4)
Requirement already satisfied: wheel>=0.26 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (0.36.2)
Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (1.0.1)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (3.3.4)
Requirement already satisfied: absl-py>=0.4 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (0.12.0)
Requirement already satisfied: grpcio>=1.24.3 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from tensorboard->detectron2==0.4) (1.37.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard->detectron2==0.4) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard->detectron2==0.4) (4.7.2)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard->detectron2==0.4) (4.2.1)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2==0.4) (1.3.0)
Requirement already satisfied: importlib-metadata in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from markdown>=2.6.8->tensorboard->detectron2==0.4) (3.10.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard->detectron2==0.4) (0.4.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.4) (1.26.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.4) (2020.12.5)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.4) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.4) (4.0.0)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2==0.4) (3.1.0)
Requirement already satisfied: typing-extensions>=3.6.4 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard->detectron2==0.4) (3.7.4.3)
Requirement already satisfied: zipp>=0.5 in /usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard->detectron2==0.4) (3.4.1)
Installing collected packages: detectron2
Running setup.py develop for detectron2
ERROR: Command errored out with exit status 1:
command: /usr/local/anaconda3/envs/instanceseg/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/sungd/detectron2/setup.py'"'"'; __file__='"'"'/home/sungd/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: /home/sungd/detectron2/
Complete output (92 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
Emitting ninja build file /home/sungd/detectron2/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/6] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o
/usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
nvcc fatal : Unknown option '-generate-dependencies-with-compile'
[2/6] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o
/usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
nvcc fatal : Unknown option '-generate-dependencies-with-compile'
[3/6] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o
/usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
nvcc fatal : Unknown option '-generate-dependencies-with-compile'
[4/6] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o
/usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
nvcc fatal : Unknown option '-generate-dependencies-with-compile'
[5/6] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o
/usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
nvcc fatal : Unknown option '-generate-dependencies-with-compile'
[6/6] /usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/cuda_version.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/cuda_version.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/cuda_version.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/cuda_version.o
/usr/local/cuda/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/cuda_version.o.d -DWITH_CUDA -I/home/sungd/detectron2/detectron2/layers/csrc -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/TH -I/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/local/anaconda3/envs/instanceseg/include/python3.7m -c -c /home/sungd/detectron2/detectron2/layers/csrc/cuda_version.cu -o /home/sungd/detectron2/build/temp.linux-x86_64-3.7/home/sungd/detectron2/detectron2/layers/csrc/cuda_version.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_37,code=sm_37 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
nvcc fatal : Unknown option '-generate-dependencies-with-compile'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1673, in _run_ninja_build
env=env)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sungd/detectron2/setup.py", line 246, in <module>
cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/setuptools/command/develop.py", line 34, in run
self.install_for_development()
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/setuptools/command/develop.py", line 136, in install_for_development
self.run_command('build_ext')
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
build_ext.build_extensions(self)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
depends=ext.depends)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 538, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1359, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/usr/local/anaconda3/envs/instanceseg/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/anaconda3/envs/instanceseg/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/sungd/detectron2/setup.py'"'"'; __file__='"'"'/home/sungd/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.
Expected behavior:
If there are no obvious error in “full logs” provided above, please tell us the expected behavior.
Environment:
Provide your environment information using the following command:
I run this command:
wget -nc -q https://github.com/facebookresearch/detectron2/raw/master/detectron2/utils/collect_env.py && python collect_env.py
just give me these response:
Traceback (most recent call last):
File "collect_env.py", line 193, in <module>
from detectron2.utils.collect_env import collect_env_info as f
ModuleNotFoundError: No module named 'detectron2.utils'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "collect_env.py", line 197, in <module>
print(collect_env_info())
File "collect_env.py", line 76, in collect_env_info
("detectron2", detectron2.__version__ + " @" + os.path.dirname(detectron2.__file__))
AttributeError: module 'detectron2' has no attribute '__version__'
some information about my environment as shown below:
system Ubuntu 18.04.4 LTS
python 3.7.10
numpy 1.19.2
cuda 10.2
GPU 0,1,2 Tesla P40, Tesla K80, Tesla K80
pytorch 1.8.1
torchvision 0.9.1
pillow 8.2.0
cv2 no install
gcc gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
g++ COLLECT_GCC=g++
if need more environment information, I will search that.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Install detectron2 on ubuntu problem: Running setup.py install ...
Here is a full command line log: within the github repository: run with command: pip3 install -e . (please read the last lines...
Read more >Installation — detectron2 0.6 documentation
If the error comes from detectron2 or torchvision that you built manually from source, remove files you built ( build/ , **/*.so )...
Read more >Detectron2 Setup.py Error In Colab Notebook For Robust CVD
when trying to install Dectron2 through Google Colab. I am trying to do so in the Colab notebook for Facebook's Robust CVD and...
Read more >error with my gcc and g++ - Unix & Linux Stack Exchange
Running setup.py develop for detectron2 ERROR: Command errored out with exit status 1: command: /home/steadysjtu/anaconda3/envs/detectron2/bin/ ...
Read more >Couldn't install detectron2 on jetson nano
Hello, I want to install detectron2 on jetson nano. My specifications are : L4T 32.5.1 [ JetPack 4.5.1 ] Ubuntu 18.04.5 LTS Kernel...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SunGd123 Maybe it is late for now. You could use suggestion from https://discuss.pytorch.org/t/how-to-run-detectron2-using-rtx-3090-and-with-cuda-11-x-on-ubuntu/119448/5 In the last line of setup.py, you change from
to
The “Common Installation Issues” already contain root cause and solutions to this issue:
Run collect_env.py and it will show the version mismatch.