-
Notifications
You must be signed in to change notification settings - Fork 96
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 #64
Comments
Getting a similar error with python=3.6, cuda=10.1, gcc=7.5.0 |
Had the same issue. What helped for me was to execute this command in my IDE (Pycharm) instead of the terminal. |
How did you do?Could you show me your code in IDE(Pycharm)? Thank You! |
How to solute this problem?I've got the same.Please give some advice.Thank you so much! |
You could try to install the ipython and then run the ipython by typing ipython. After than you should type:
That will also run the setup.py. |
请问解决了嘛,我也遇到了同样的问题,运行不了setup.py |
Hello, according to the prompts in the README file, I encountered the following error when running “python setup.py build_ext --inplace”
running build_ext
building 'C' extension
Emitting ninja build file /data/2zhujuntao/vistr/models/dcn/build/temp.linux-x86_64-3.6/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /usr/local/cuda:/usr/local/cuda/bin/nvcc -DWITH_CUDA -Ideformable -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/TH -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda:/usr/local/cuda/include -I/home/user/anaconda3/envs/vistr/include/python3.6m -c -c /data/2zhujuntao/vistr/models/dcn/deformable/deform_conv_cuda.cu -o /data/2zhujuntao/vistr/models/dcn/build/temp.linux-x86_64-3.6/deformable/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS_ -D__CUDA_NO_HALF_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 -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /data/2zhujuntao/vistr/models/dcn/build/temp.linux-x86_64-3.6/deformable/deform_conv_cuda.o
/usr/local/cuda:/usr/local/cuda/bin/nvcc -DWITH_CUDA -Ideformable -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/TH -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda:/usr/local/cuda/include -I/home/user/anaconda3/envs/vistr/include/python3.6m -c -c /data/2zhujuntao/vistr/models/dcn/deformable/deform_conv_cuda.cu -o /data/2zhujuntao/vistr/models/dcn/build/temp.linux-x86_64-3.6/deformable/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS_ -D__CUDA_NO_HALF_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 -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
/bin/sh: 1: /usr/local/cuda:/usr/local/cuda/bin/nvcc: not found
[2/2] /usr/local/cuda:/usr/local/cuda/bin/nvcc -DWITH_CUDA -Ideformable -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/TH -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda:/usr/local/cuda/include -I/home/user/anaconda3/envs/vistr/include/python3.6m -c -c /data/2zhujuntao/vistr/models/dcn/deformable/deform_conv_cuda_kernel.cu -o /data/2zhujuntao/vistr/models/dcn/build/temp.linux-x86_64-3.6/deformable/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'"'"'' -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 -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /data/2zhujuntao/vistr/models/dcn/build/temp.linux-x86_64-3.6/deformable/deform_conv_cuda_kernel.o
/usr/local/cuda:/usr/local/cuda/bin/nvcc -DWITH_CUDA -Ideformable -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/TH -I/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda:/usr/local/cuda/include -I/home/user/anaconda3/envs/vistr/include/python3.6m -c -c /data/2zhujuntao/vistr/models/dcn/deformable/deform_conv_cuda_kernel.cu -o /data/2zhujuntao/vistr/models/dcn/build/temp.linux-x86_64-3.6/deformable/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'"'"'' -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 -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
/bin/sh: 1: /usr/local/cuda:/usr/local/cuda/bin/nvcc: not found
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build
env=env)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 22, in
cmdclass={'build_ext': BuildExtension})
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/setuptools/init.py", line 163, in setup
return distutils.core.setup(**attrs)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/user/anaconda3/envs/vistr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 649, in build_extensions
build_ext.build_extensions(self)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/user/anaconda3/envs/vistr/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
_build_ext.build_extension(self, ext)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 478, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1233, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/home/user/anaconda3/envs/vistr/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build
raise RuntimeError(message)
RuntimeError: Error compiling objects for extension
May I ask how is this going?
The text was updated successfully, but these errors were encountered: