mapillary/inplace_abn

recent pip installation error

antran89 opened this issue · 4 comments

I have installed successfully inplace_abn before, but recently, I installed again. It throws errors. Could you please figure out why?

docker@a57c287a8ce0:~/python_modules/satellite_missing_roads/deploy$ pip install inplace_abn==1.0.12
Defaulting to user installation because normal site-packages is not writeable
Collecting inplace_abn==1.0.12
  Downloading inplace-abn-1.0.12.tar.gz (137 kB)
     |████████████████████████████████| 137 kB 8.6 MB/s
Building wheels for collected packages: inplace-abn
  Building wheel for inplace-abn (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/conda/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fkji4_1_/inplace-abn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fkji4_1_/inplace-abn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-u1biiwwu
       cwd: /tmp/pip-install-fkji4_1_/inplace-abn/
  Complete output (97 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/inplace_abn
  copying inplace_abn/__init__.py -> build/lib.linux-x86_64-3.6/inplace_abn
  copying inplace_abn/_version.py -> build/lib.linux-x86_64-3.6/inplace_abn
  copying inplace_abn/abn.py -> build/lib.linux-x86_64-3.6/inplace_abn
  copying inplace_abn/functions.py -> build/lib.linux-x86_64-3.6/inplace_abn
  copying inplace_abn/group.py -> build/lib.linux-x86_64-3.6/inplace_abn
  running build_ext
  building 'inplace_abn._backend' extension
  creating /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6
  creating /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src
  Emitting ninja build file /tmp/pip-install-fkji4_1_/inplace-abn/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/4] /usr/local/cuda/bin/nvcc -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn_cuda.cu -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cuda.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=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
  FAILED: /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cuda.o
  /usr/local/cuda/bin/nvcc -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn_cuda.cu -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cuda.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=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
  /bin/sh: 1: /usr/local/cuda/bin/nvcc: not found
  [2/4] c++ -MMD -MF /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/utils.o.d -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/utils.cpp -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/utils.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  [3/4] c++ -MMD -MF /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cpu.o.d -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn_cpu.cpp -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cpu.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  [4/4] c++ -MMD -MF /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn.o.d -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn.cpp -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  In file included from /opt/conda/lib/python3.6/site-packages/torch/include/ATen/Parallel.h:149:0,
                   from /opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                   from /opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                   from /opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                   from /opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                   from /opt/conda/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
                   from /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn.cpp:3:
  /opt/conda/lib/python3.6/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
   #pragma omp parallel for if ((end - begin) >= grain_size)
   ^
  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build
      env=env)
    File "/opt/conda/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 "<string>", line 1, in <module>
    File "/tmp/pip-install-fkji4_1_/inplace-abn/setup.py", line 75, in <module>
      cmdclass={"build_ext": BuildExtension}
    File "/opt/conda/lib/python3.6/site-packages/setuptools/__init__.py", line 163, in setup
      return distutils.core.setup(**attrs)
    File "/opt/conda/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/opt/conda/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/opt/conda/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 290, in run
      self.run_command('build')
    File "/opt/conda/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/opt/conda/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/opt/conda/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 87, in run
      _build_ext.run(self)
    File "/opt/conda/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
    File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 649, in build_extensions
      build_ext.build_extensions(self)
    File "/opt/conda/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
      _build_ext.build_ext.build_extensions(self)
    File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
      self._build_extensions_serial()
    File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
      self.build_extension(ext)
    File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
      _build_ext.build_extension(self, ext)
    File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
      depends=ext.depends)
    File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 478, in unix_wrap_ninja_compile
      with_cuda=with_cuda)
    File "/opt/conda/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 "/opt/conda/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
  ----------------------------------------
  ERROR: Failed building wheel for inplace-abn
  Running setup.py clean for inplace-abn
Failed to build inplace-abn
DEPRECATION: Could not build wheels for inplace-abn which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: inplace-abn
    Running setup.py install for inplace-abn ... error
    ERROR: Command errored out with exit status 1:
     command: /opt/conda/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fkji4_1_/inplace-abn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fkji4_1_/inplace-abn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pv62ixgs/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/docker/.local/include/python3.6m/inplace-abn
         cwd: /tmp/pip-install-fkji4_1_/inplace-abn/
    Complete output (99 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/inplace_abn
    copying inplace_abn/__init__.py -> build/lib.linux-x86_64-3.6/inplace_abn
    copying inplace_abn/_version.py -> build/lib.linux-x86_64-3.6/inplace_abn
    copying inplace_abn/abn.py -> build/lib.linux-x86_64-3.6/inplace_abn
    copying inplace_abn/functions.py -> build/lib.linux-x86_64-3.6/inplace_abn
    copying inplace_abn/group.py -> build/lib.linux-x86_64-3.6/inplace_abn
    running build_ext
    building 'inplace_abn._backend' extension
    creating /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6
    creating /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src
    Emitting ninja build file /tmp/pip-install-fkji4_1_/inplace-abn/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/4] /usr/local/cuda/bin/nvcc -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn_cuda.cu -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cuda.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=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
    FAILED: /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cuda.o
    /usr/local/cuda/bin/nvcc -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn_cuda.cu -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cuda.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=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=sm_70 -std=c++14
    /bin/sh: 1: /usr/local/cuda/bin/nvcc: not found
    [2/4] c++ -MMD -MF /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/utils.o.d -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/utils.cpp -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/utils.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    [3/4] c++ -MMD -MF /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cpu.o.d -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn_cpu.cpp -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn_cpu.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    [4/4] c++ -MMD -MF /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn.o.d -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=1 -I/tmp/pip-install-fkji4_1_/inplace-abn/include -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn.cpp -o /tmp/pip-install-fkji4_1_/inplace-abn/build/temp.linux-x86_64-3.6/src/inplace_abn.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from /opt/conda/lib/python3.6/site-packages/torch/include/ATen/Parallel.h:149:0,
                     from /opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                     from /opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                     from /opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                     from /opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                     from /opt/conda/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
                     from /tmp/pip-install-fkji4_1_/inplace-abn/src/inplace_abn.cpp:3:
    /opt/conda/lib/python3.6/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
     #pragma omp parallel for if ((end - begin) >= grain_size)
     ^
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build
        env=env)
      File "/opt/conda/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 "<string>", line 1, in <module>
      File "/tmp/pip-install-fkji4_1_/inplace-abn/setup.py", line 75, in <module>
        cmdclass={"build_ext": BuildExtension}
      File "/opt/conda/lib/python3.6/site-packages/setuptools/__init__.py", line 163, in setup
        return distutils.core.setup(**attrs)
      File "/opt/conda/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/opt/conda/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/opt/conda/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/opt/conda/lib/python3.6/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/opt/conda/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/opt/conda/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/opt/conda/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 87, in run
        _build_ext.run(self)
      File "/opt/conda/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
        _build_ext.build_ext.run(self)
      File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 649, in build_extensions
        build_ext.build_extensions(self)
      File "/opt/conda/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
        _build_ext.build_ext.build_extensions(self)
      File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
        self._build_extensions_serial()
      File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
        self.build_extension(ext)
      File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
        _build_ext.build_extension(self, ext)
      File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
        depends=ext.depends)
      File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 478, in unix_wrap_ninja_compile
        with_cuda=with_cuda)
      File "/opt/conda/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 "/opt/conda/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
    ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/conda/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fkji4_1_/inplace-abn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fkji4_1_/inplace-abn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pv62ixgs/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/docker/.local/include/python3.6m/inplace-abn Check the logs for full command output.

@antran89 from the error log I see that Ninja is not able to locate the cuda compiler (nvcc) in your system. Can you please verify that nvcc works, and that the CUDA_HOME env variable is correctly set?

I don't know why but when I switch into CUDA10, it would solve the problem.

@antran89 good to hear that your issue is solved, closing this now.

I have solved it by set CUDA_HOME in shell before python setup.py install:
export CUDA_HOME=/usr/local/cuda-11.3