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

python setup.py build_ext --inplace出现错误 #21

Closed
MTCai opened this issue Dec 5, 2019 · 8 comments
Closed

python setup.py build_ext --inplace出现错误 #21

MTCai opened this issue Dec 5, 2019 · 8 comments

Comments

@MTCai
Copy link

MTCai commented Dec 5, 2019

/usr/local/cuda:/usr/local/cuda:/usr/local/cuda-9.0/bin/nvcc -I/home/nmt/anaconda3/envs/pytorch1_2/lib/python3.6/site-packages/torch/include -I/home/nmt/anaconda3/envs/pytorch1_2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/nmt/anaconda3/envs/pytorch1_2/lib/python3.6/site-packages/torch/include/TH -I/home/nmt/anaconda3/envs/pytorch1_2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda:/usr/local/cuda:/usr/local/cuda-9.0/include -I/home/nmt/anaconda3/envs/pytorch1_2/include/python3.6m -c src/deform_conv_cuda_kernel.cu -o build/temp.linux-x86_64-3.6/src/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
unable to execute '/usr/local/cuda:/usr/local/cuda:/usr/local/cuda-9.0/bin/nvcc': No such file or directory
error: command '/usr/local/cuda:/usr/local/cuda:/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1

试过更改.brashrc的CUDA的环境变量,但是不行,这个问题要怎么解决?

@Leo9113
Copy link

Leo9113 commented Dec 5, 2019

同问+1

@MhLiao
Copy link
Owner

MhLiao commented Dec 5, 2019

建议检查以下CUDA_HOME,以及默认cuda路径的版本是否与pytorch的一致。

@MhLiao
Copy link
Owner

MhLiao commented Dec 9, 2019

Make sure your CUDA path of $CUDA_HOME is the same version as your CUDA in PyTorch by the command of echo $CUDA_HOME. If not, you need to change the $CUDA_HOME by export CUDA_HOME=path-of-another-version or re-install PyTorch with the same CUDA version as in CUDA_HOME.

@MhLiao MhLiao closed this as completed Dec 16, 2019
@ouguozhen
Copy link

@MhLiao 能否在python2下编译呢?

@Tian14267
Copy link

请问楼主问题解决了吗?我的pytorch==1.0.0 cuda == 9.0。遇到跟你一样的问题。请问怎么解决啊。 @ @MTCai @MhLiao @suntianlei2019102967

@fujingling
Copy link

遇到了同样的问题,惆怅中

@fujingling
Copy link

我是编译通过,运行eval.py时报错DB/assets/ops/dcn/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs

@xray1111
Copy link

@fujingling @Tian14267 请问你们编译错误的问题是怎么解决的啊?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants