pytorch / extension-cpp

C++ extensions in PyTorch
1.02k stars 214 forks source link

unable to execute ':/usr/local/cuda-9.0/bin/nvcc': No such file or directory error: command ':/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1 #48

Closed GuHongyang closed 5 years ago

GuHongyang commented 5 years ago

running install running bdist_egg running egg_info writing lltm_cuda.egg-info/PKG-INFO writing dependency_links to lltm_cuda.egg-info/dependency_links.txt writing top-level names to lltm_cuda.egg-info/top_level.txt reading manifest file 'lltm_cuda.egg-info/SOURCES.txt' writing manifest file 'lltm_cuda.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'lltm_cuda' extension gcc -pthread -B /home/guhongyang/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/guhongyang/anaconda3/lib/python3.7/site-packages/torch/include -I/home/guhongyang/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/guhongyang/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/guhongyang/anaconda3/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda-9.0/include -I/home/guhongyang/anaconda3/include/python3.7m -c lltm_cuda.cpp -o build/temp.linux-x86_64-3.7/lltm_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=lltm_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ :/usr/local/cuda-9.0/bin/nvcc -I/home/guhongyang/anaconda3/lib/python3.7/site-packages/torch/include -I/home/guhongyang/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/guhongyang/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/guhongyang/anaconda3/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda-9.0/include -I/home/guhongyang/anaconda3/include/python3.7m -c lltm_cuda_kernel.cu -o build/temp.linux-x86_64-3.7/lltm_cuda_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=lltm_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++11 unable to execute ':/usr/local/cuda-9.0/bin/nvcc': No such file or directory error: command ':/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1

GuHongyang commented 5 years ago
屏幕快照 2019-10-16 下午4 30 04
abhigoku10 commented 3 years ago

@GuHongyang what is the solution for this error ??

ClementPinard commented 3 years ago

you just need to have cuda folder in your PATH and LD_LIBRARY_PATH

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64\
                         ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
abhigoku10 commented 3 years ago

@ClementPinard thanks for the response i am on windows and i have added in the cuda paths in environment variables

ClementPinard commented 3 years ago

Well in this case, You probably don't have the same problem. Can you locate nvcc ? Are you using Windows or WSL ? Do you succeed in compiling the official example ? https://github.com/pytorch/extension-cpp

abhigoku10 commented 3 years ago

@ClementPinard i am using windows , and when i do nvcc-version i am able to see the cuda version , In the offical example i am able to run the cpp but when i run the cuda setup.py i get this error image

from the following it seems that its checking for cuda10 but in below is my sys config windows10 cuda9.0 pytorch1.0.1 VS2019