Trying Install torch-linear-assignment using different ways and each time have the following error:
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: torch>=1.12.0 in /opt/conda/lib/python3.10/site-packages (from torch-linear-assignment==0.0.1.post3) (2.1.0+cu121)
Requirement already satisfied: scipy>=1.6.0 in /opt/conda/lib/python3.10/site-packages (from torch-linear-assignment==0.0.1.post3) (1.10.1)
Requirement already satisfied: numpy<1.27.0,>=1.19.5 in /opt/conda/lib/python3.10/site-packages (from scipy>=1.6.0->torch-linear-assignment==0.0.1.post3) (1.23.5)
Requirement already satisfied: networkx in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (3.0)
Requirement already satisfied: typing-extensions in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (4.5.0)
Requirement already satisfied: sympy in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (1.11.1)
Requirement already satisfied: jinja2 in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (3.1.2)
Requirement already satisfied: filelock in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (3.16.1)
Requirement already satisfied: fsspec in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (2023.3.0)
Requirement already satisfied: triton==2.1.0 in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (2.1.0)
Requirement already satisfied: MarkupSafe>=2.0 in /opt/conda/lib/python3.10/site-packages (from jinja2->torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (2.1.2)
Requirement already satisfied: mpmath>=0.19 in /opt/conda/lib/python3.10/site-packages (from sympy->torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (1.3.0)
Building wheels for collected packages: torch-linear-assignment
Building wheel for torch-linear-assignment (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python3.10 /opt/conda/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp9yfeiyqa
cwd: /home/jovyan/DigitalAvatar/RMTPP-2/ERPP-RMTPP/Experiments/torch-linear-assignment
Complete output (23 lines):
/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/_subclasses/functional_tensor.py:295: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
cpu = _conversion_method_template(device=torch.device("cpu"))
running bdist_wheel
/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/utils/cpp_extension.py:497: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_py
copying torch_linear_assignment/init.py -> build/lib.linux-x86_64-cpython-310/torch_linear_assignment
copying torch_linear_assignment/assignment.py -> build/lib.linux-x86_64-cpython-310/torch_linear_assignment
running build_ext
/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/utils/cpp_extension.py:416: UserWarning: The detected CUDA version (12.1) has a minor version mismatch with the version that was used to compile PyTorch (12.4). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/utils/cpp_extension.py:426: UserWarning: There are no g++ version bounds defined for CUDA version 12.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'torch_linear_assignment._backend' extension
g++ -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/TH -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/THC -I/opt/conda/include -I/opt/conda/include/python3.10 -c src/torch_linear_assignment_cuda.cpp -o build/temp.linux-x86_64-cpython-310/src/torch_linear_assignment_cuda.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/utils/cpp_extension.py:1964: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
/opt/conda/bin/nvcc -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/TH -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/THC -I/opt/conda/include -I/opt/conda/include/python3.10 -c src/torch_linear_assignment_cuda_kernel.cu -o build/temp.linux-x86_64-cpython-310/src/torch_linear_assignment_cuda_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options '-fPIC' -ccbin gcc -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++17
cc1plus: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
error: command '/opt/conda/bin/nvcc' failed with exit code 1
ERROR: Failed building wheel for torch-linear-assignment
Failed to build torch-linear-assignment
ERROR: Could not build wheels for torch-linear-assignment, which is required to install pyproject.toml-based projects
Trying Install torch-linear-assignment using different ways and each time have the following error:
Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: torch>=1.12.0 in /opt/conda/lib/python3.10/site-packages (from torch-linear-assignment==0.0.1.post3) (2.1.0+cu121) Requirement already satisfied: scipy>=1.6.0 in /opt/conda/lib/python3.10/site-packages (from torch-linear-assignment==0.0.1.post3) (1.10.1) Requirement already satisfied: numpy<1.27.0,>=1.19.5 in /opt/conda/lib/python3.10/site-packages (from scipy>=1.6.0->torch-linear-assignment==0.0.1.post3) (1.23.5) Requirement already satisfied: networkx in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (3.0) Requirement already satisfied: typing-extensions in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (4.5.0) Requirement already satisfied: sympy in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (1.11.1) Requirement already satisfied: jinja2 in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (3.1.2) Requirement already satisfied: filelock in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (3.16.1) Requirement already satisfied: fsspec in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (2023.3.0) Requirement already satisfied: triton==2.1.0 in /opt/conda/lib/python3.10/site-packages (from torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (2.1.0) Requirement already satisfied: MarkupSafe>=2.0 in /opt/conda/lib/python3.10/site-packages (from jinja2->torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (2.1.2) Requirement already satisfied: mpmath>=0.19 in /opt/conda/lib/python3.10/site-packages (from sympy->torch>=1.12.0->torch-linear-assignment==0.0.1.post3) (1.3.0) Building wheels for collected packages: torch-linear-assignment Building wheel for torch-linear-assignment (pyproject.toml) ... error ERROR: Command errored out with exit status 1: command: /opt/conda/bin/python3.10 /opt/conda/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp9yfeiyqa cwd: /home/jovyan/DigitalAvatar/RMTPP-2/ERPP-RMTPP/Experiments/torch-linear-assignment Complete output (23 lines): /tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/_subclasses/functional_tensor.py:295: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.) cpu = _conversion_method_template(device=torch.device("cpu")) running bdist_wheel /tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/utils/cpp_extension.py:497: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) running build running build_py copying torch_linear_assignment/init.py -> build/lib.linux-x86_64-cpython-310/torch_linear_assignment copying torch_linear_assignment/assignment.py -> build/lib.linux-x86_64-cpython-310/torch_linear_assignment running build_ext /tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/utils/cpp_extension.py:416: UserWarning: The detected CUDA version (12.1) has a minor version mismatch with the version that was used to compile PyTorch (12.4). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) /tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/utils/cpp_extension.py:426: UserWarning: There are no g++ version bounds defined for CUDA version 12.1 warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}') building 'torch_linear_assignment._backend' extension g++ -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/TH -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/THC -I/opt/conda/include -I/opt/conda/include/python3.10 -c src/torch_linear_assignment_cuda.cpp -o build/temp.linux-x86_64-cpython-310/src/torch_linear_assignment_cuda.o -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17 /tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/utils/cpp_extension.py:1964: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST']. warnings.warn( /opt/conda/bin/nvcc -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/TH -I/tmp/pip-build-env-ndy8zros/overlay/lib/python3.10/site-packages/torch/include/THC -I/opt/conda/include -I/opt/conda/include/python3.10 -c src/torch_linear_assignment_cuda_kernel.cu -o build/temp.linux-x86_64-cpython-310/src/torch_linear_assignment_cuda_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options '-fPIC' -ccbin gcc -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++17 cc1plus: fatal error: cuda_runtime.h: No such file or directory compilation terminated. error: command '/opt/conda/bin/nvcc' failed with exit code 1
ERROR: Failed building wheel for torch-linear-assignment Failed to build torch-linear-assignment ERROR: Could not build wheels for torch-linear-assignment, which is required to install pyproject.toml-based projects