Open harshal-14 opened 3 months ago
Donot use the environment.yaml file to prepare the conda environment directly. Follow this process step by step:
nvidia-smi
on a terminal to verify installation. conda install nvidia/label/cuda-12.1.0::cuda-nvcc
conda install nvidia/label/cuda-12.1.0::cuda-toolkit
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
import torch
print(torch.cuda.is_available()) # This should return true.
print(torch.cuda.get_device_name(0)) # You should see the name of your GPU
Could you explain how did you install other pending packages one by one? Because when I try to install the simple-knn package, I get an error.
What is the error that you are getting. Here is the command to install simple-knn (run from the MonoGS directory
pip install submodules/simple-knn
Running setup.py install for simple-knn ... error
error: subprocess-exited-with-error
× Running setup.py install for simple-knn did not run successfully.
│ exit code: 1
╰─> [56 lines of output]
No CUDA runtime is found, using CUDA_HOME='/home/cz/anaconda3/envs/MonoGS'
running install
/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_ext
/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/torch/utils/cpp_extension.py:476: 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.'))
Traceback (most recent call last):
File "<string>", line 36, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/home/cz/Documents/MonoGS/submodules/simple-knn/setup.py", line 33, in <module>
'build_ext': BuildExtension
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/command/install.py", line 68, in run
return orig.install.run(self)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/command/install.py", line 698, in run
self.run_command('build')
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/dist.py", line 1208, in run_command
super().run_command(command)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 499, in build_extensions
_check_cuda_version(compiler_name, compiler_version)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 382, in _check_cuda_version
torch_cuda_version = packaging.version.parse(torch.version.cuda)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 49, in parse
return Version(version)
File "/home/cz/anaconda3/envs/MonoGS/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 264, in __init__
match = self._regex.search(version)
TypeError: expected string or bytes-like object
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> simple-knn
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I think the problem is about the version of CUDA. My first CUDA version was 12.1 but it didnt work. I have changed the CUDA version to 11.7 but get same error...
didi you check nvcc --version
inside your Conda environment?
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
install cuda 12.1 and its corresponding tool kit. then use the command in above image to install the correct pytorch version.
or install the correct pytorch version for cuda 11.7:
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.7 -c pytorch -c nvidia
When I check the NVIDIA GPU drivers using nvidia-smi
command, my Nvidia Cuda version isNVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2
, but we still try to install the 12.1 version. Does it cause my problem?
When I check the NVIDIA GPU drivers using
nvidia-smi
command, my Nvidia Cuda version isNVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2
, but we still try to install the 12.1 version. Does it cause my problem?
No, that doesn't cause any problem.
Hi I'm not able to setup the conda environment with the help of environment.yaml file. Kindly help me debug this issue: