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

ERROR: Could not build wheels for MinkowskiEngine, which is required to install pyproject.toml-based projects #584

Open
yqi19 opened this issue Mar 21, 2024 · 3 comments

Comments

@yqi19
Copy link

yqi19 commented Mar 21, 2024

Hi everyone, when I am installing MinknowskiEngine using pip, I encounter the following error:

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for MinkowskiEngine
  Running setup.py clean for MinkowskiEngine
Failed to build MinkowskiEngine
ERROR: Could not build wheels for MinkowskiEngine, which is required to install pyproject.toml-based projects

I was wondering if anyone shares similar issues?

Thanks!

@yqi19
Copy link
Author

yqi19 commented Mar 21, 2024

A more detailed error instruction is:

Processing /home/yu/MinkowskiEngine
  Preparing metadata (setup.py) ... done
Requirement already satisfied: torch in /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages (from MinkowskiEngine==0.5.4) (1.9.0)
Requirement already satisfied: numpy in /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages (from MinkowskiEngine==0.5.4) (1.20.3)
Requirement already satisfied: typing_extensions in /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages (from torch->MinkowskiEngine==0.5.4) (4.9.0)
Building wheels for collected packages: MinkowskiEngine
  Building wheel for MinkowskiEngine (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [161 lines of output]
      WARNING: Skipping MinkowskiEngine as it is not installed.
      --------------------------------
      | CUDA compilation set         |
      --------------------------------
      
      Using BLAS=openblas
      Using the default compiler
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiFunctional.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiPruning.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiChannelwiseConvolution.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiUnion.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiConvolution.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/__init__.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiNormalization.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiCommon.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiPooling.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiTensorField.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiCoordinateManager.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/sparse_matrix_functions.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiSparseTensor.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiNetwork.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiTensor.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiOps.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/diagnostics.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiInterpolation.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiBroadcast.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiKernelGenerator.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      copying ./MinkowskiEngine/MinkowskiNonlinearity.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine
      creating build/lib.linux-x86_64-cpython-38/MinkowskiEngine/utils
      copying ./MinkowskiEngine/utils/summary.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/utils
      copying ./MinkowskiEngine/utils/gradcheck.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/utils
      copying ./MinkowskiEngine/utils/quantization.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/utils
      copying ./MinkowskiEngine/utils/__init__.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/utils
      copying ./MinkowskiEngine/utils/collation.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/utils
      copying ./MinkowskiEngine/utils/init.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/utils
      copying ./MinkowskiEngine/utils/coords.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/utils
      creating build/lib.linux-x86_64-cpython-38/MinkowskiEngine/modules
      copying ./MinkowskiEngine/modules/__init__.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/modules
      copying ./MinkowskiEngine/modules/senet_block.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/modules
      copying ./MinkowskiEngine/modules/resnet_block.py -> build/lib.linux-x86_64-cpython-38/MinkowskiEngine/modules
      running build_ext
      building 'MinkowskiEngineBackend._C' extension
      creating /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38
      creating /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home
      creating /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu
      creating /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu/MinkowskiEngine
      creating /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu/MinkowskiEngine/src
      creating /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/pybind
      Emitting ninja build file /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/build.ninja...
      Compiling objects...
      Using envvar MAX_JOBS (2) as the number of workers...
      [1/21] /usr/bin/nvcc  -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/TH -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/THC -I/home/yu/MinkowskiEngine/src -I/home/yu/MinkowskiEngine/src/3rdparty -I/home/yu/anaconda3/envs/py3-mink/include/python3.8 -c -c /home/yu/MinkowskiEngine/src/broadcast_kernel.cu -o /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu/MinkowskiEngine/src/broadcast_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' --expt-relaxed-constexpr --expt-extended-lambda -O3 -Xcompiler=-fno-gnu-unique -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
      FAILED: /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu/MinkowskiEngine/src/broadcast_kernel.o
      /usr/bin/nvcc  -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/TH -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/THC -I/home/yu/MinkowskiEngine/src -I/home/yu/MinkowskiEngine/src/3rdparty -I/home/yu/anaconda3/envs/py3-mink/include/python3.8 -c -c /home/yu/MinkowskiEngine/src/broadcast_kernel.cu -o /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu/MinkowskiEngine/src/broadcast_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' --expt-relaxed-constexpr --expt-extended-lambda -O3 -Xcompiler=-fno-gnu-unique -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |                                                                                                                                                 ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |                                                                                                                                                  ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      [2/21] /usr/bin/nvcc  -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/TH -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/THC -I/home/yu/MinkowskiEngine/src -I/home/yu/MinkowskiEngine/src/3rdparty -I/home/yu/anaconda3/envs/py3-mink/include/python3.8 -c -c /home/yu/MinkowskiEngine/src/broadcast_gpu.cu -o /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu/MinkowskiEngine/src/broadcast_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' --expt-relaxed-constexpr --expt-extended-lambda -O3 -Xcompiler=-fno-gnu-unique -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
      FAILED: /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu/MinkowskiEngine/src/broadcast_gpu.o
      /usr/bin/nvcc  -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/TH -I/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/THC -I/home/yu/MinkowskiEngine/src -I/home/yu/MinkowskiEngine/src/3rdparty -I/home/yu/anaconda3/envs/py3-mink/include/python3.8 -c -c /home/yu/MinkowskiEngine/src/broadcast_gpu.cu -o /home/yu/MinkowskiEngine/build/temp.linux-x86_64-cpython-38/home/yu/MinkowskiEngine/src/broadcast_gpu.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' --expt-relaxed-constexpr --expt-extended-lambda -O3 -Xcompiler=-fno-gnu-unique -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
      /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/ATen/core/builtin_function.h(110): warning #20236-D: pragma "diag_suppress" is deprecated, use "nv_diag_suppress" instead
      
      /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/ATen/core/builtin_function.h(117): warning #20236-D: pragma "diag_default" is deprecated, use "nv_diag_default" instead
      
      /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/ATen/core/builtin_function.h(110): warning #20236-D: pragma "diag_suppress" is deprecated, use "nv_diag_suppress" instead
      
      /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/ATen/core/builtin_function.h(117): warning #20236-D: pragma "diag_default" is deprecated, use "nv_diag_default" instead
      
      /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/ATen/core/builtin_function.h(110): warning #20236-D: pragma "diag_suppress" is deprecated, use "nv_diag_suppress" instead
      
      /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/ATen/core/builtin_function.h(117): warning #20236-D: pragma "diag_default" is deprecated, use "nv_diag_default" instead
      
      /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/ATen/core/builtin_function.h(110): warning #20236-D: pragma "diag_suppress" is deprecated, use "nv_diag_suppress" instead
      
      /home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/include/ATen/core/builtin_function.h(117): warning #20236-D: pragma "diag_default" is deprecated, use "nv_diag_default" instead
      
      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |                                                                                                                                                 ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |                                                                                                                                                  ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypesninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1666, in _run_ninja_build
          subprocess.run(
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/subprocess.py", line 516, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '2']' returned non-zero exit status 1.
      
      The above exception was the direct cause of the following exception:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/yu/MinkowskiEngine/setup.py", line 320, in <module>
          setup(
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 88, in run
          _build_ext.run(self)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
          build_ext.build_extensions(self)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 249, in build_extension
          _build_ext.build_extension(self, ext)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/Cython/Distutils/build_ext.py", line 135, in build_extension
          super(build_ext, self).build_extension(ext)
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 530, in unix_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1355, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/home/yu/anaconda3/envs/py3-mink/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for MinkowskiEngine
  Running setup.py clean for MinkowskiEngineFailed to build MinkowskiEngine from a __host__ __device__ function("mi
ERROR: Could not build wheels for MinkowskiEngine, which is required to install pyproject.toml-based projects

@MathewCrespo
Copy link

same here

@wahab-hac
Copy link

i got the same error in google colab but not found any answer.

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

3 participants