Closed xuyichengyy closed 3 years ago
It seems that ninja is not available in your environment. ninja is used in nvcc to set default works, and it is usually installed by default. You can try to install ninja and run setup.py again.
Take a look at the following repository too.
when I run python setup.py build.I referred to other answers, but they were different from my question. it got a failed.the error and environment is below thank you!
FAILED: /home/cver0/cxy/deep-hough-transform-master/model/_cdht/build/temp.linux-x86_64-3.7/deep_hough_cuda_kernel.o :/usr/local/cuda/bin/nvcc -I/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/include -I/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/include/TH -I/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda/include -I/home/cver0/anaconda3/envs/seline/include/python3.7m -c -c /home/cver0/cxy/deep-hough-transform-master/model/_cdht/deep_hough_cuda_kernel.cu -o /home/cver0/cxy/deep-hough-transform-master/model/_cdht/build/temp.linux-x86_64-3.7/deep_hough_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -arch=sm_60 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deep_hough -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 /bin/sh: 1: :/usr/local/cuda/bin/nvcc: not found ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1522, in _run_ninja_build env=env) File "/home/cver0/anaconda3/envs/seline/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
environment `PyTorch version: 1.7.0 Is debug build: True CUDA used to build PyTorch: 11.0 ROCM used to build PyTorch: N/AOS: Ubuntu 16.04.4 LTS (x86_64) GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 Clang version: Could not collect CMake version: version 3.5.1 Libc version: glibc-2.17
Python version: 3.7.11 (default, Jul 27 2021, 14:32:16) [GCC 7.5.0] (64-bit runtime) Python platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid Is CUDA available: True CUDA runtime version: 10.1.105 GPU models and configuration: GPU 0: Quadro RTX 4000 Nvidia driver version: 450.57 cuDNN version: Could not collect HIP runtime version: N/A MIOpen runtime version: N/A
Versions of relevant libraries: [pip3] numpy==1.20.3 [pip3] torch==1.7.0 [pip3] torchaudio==0.7.0a0+ac17b64 [pip3] torchvision==0.8.0 [conda] blas 1.0 mkl defaults [conda] cudatoolkit 11.0.221 h6bb024c_0 defaults [conda] mkl 2021.3.0 h06a4308_520 defaults [conda] mkl-service 2.4.0 py37h7f8727e_0 defaults [conda] mkl_fft 1.3.0 py37h42c9631_2 defaults [conda] mkl_random 1.2.2 py37h51133e4_0 defaults [conda] numpy 1.20.3 py37hf144106_0 defaults [conda] numpy-base 1.20.3 py37h74d4b33_0 defaults [conda] pytorch 1.7.0 py3.7_cuda11.0.221_cudnn8.0.3_0 pytorch [conda] torchaudio 0.7.0 py37 pytorch [conda] torchvision 0.8.0 py37_cu110 pytorch `