NVIDIA / MinkowskiEngine

Minkowski Engine is an auto-diff neural network library for high-dimensional sparse tensors
https://nvidia.github.io/MinkowskiEngine
Other
2.43k stars 360 forks source link

Problem when instaling with pip #597

Open tammy3107 opened 3 months ago

tammy3107 commented 3 months ago

when I try to run the command :

pip3 install -U MinkowskiEngine

I get this error:-

Defaulting to user installation because normal site-packages is not writeable Collecting MinkowskiEngine Using cached MinkowskiEngine-0.5.4.tar.gz (246 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [30 lines of output] WARNING: Skipping MinkowskiEngine as it is not installed. /tmp/pip-install-xanp8c26/minkowskiengine_2d159e464abb4b1b807b1d21d63a14fd/setup.py:195: DeprecationWarning:

    `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
    of the deprecation of `distutils` itself. It will be removed for
    Python >= 3.12. For older Python versions it will remain present.
    It is recommended to use `setuptools < 60.0` for those Python versions.
    For more details, see:
      https://numpy.org/devdocs/reference/distutils_status_migration.html

    import numpy.distutils.system_info as sysinfo
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-xanp8c26/minkowskiengine_2d159e464abb4b1b807b1d21d63a14fd/setup.py", line 305, in <module>
      Extension(
    File "/home/das.t.5@int.pg.com/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1077, in CUDAExtension
      library_dirs += library_paths(cuda=True)
    File "/home/das.t.5@int.pg.com/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1204, in library_paths
      if (not os.path.exists(_join_cuda_home(lib_dir)) and
    File "/home/das.t.5@int.pg.com/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2419, in _join_cuda_home
      raise OSError('CUDA_HOME environment variable is not set. '
  OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
  --------------------------------
  | CUDA compilation set         |
  --------------------------------

  Using BLAS=openblas
  Using the default compiler
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

flyyuan commented 3 months ago

+1

BuckyI commented 3 months ago

Try to install cuda in conda (choose the right cuda version).

conda install cuda -c nvidia/label/cuda-11.3.0

nvcc --version # validate

see: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#conda-installation