I have installed Lightning on my device using Conda.
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0
nvidia-smi
Fri Oct 13 21:34:35 2023
±--------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.113.01 Driver Version: 535.113.01 CUDA Version: 12.2 |
|-----------------------------------------±---------------------±---------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 1660 … Off | 00000000:01:00.0 Off | N/A |
| N/A 84C P0 59W / 60W | 1826MiB / 6144MiB | 95% Default |
| | | N/A |
±----------------------------------------±---------------------±---------------------+
NOW:
The observed error is (after repetitive attempts to solve it):
import lightning
/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: 'libc10_cuda.so: cannot open shared object file: No such file or directory’If you don’t plan on using image functionality fromtorchvision.io
, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you havelibjpeg
orlibpng
installed before buildingtorchvision
from source?
warn(
Traceback (most recent call last):
File “”, line 1, in
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/lightning/init.py”, line 19, in
from lightning.pytorch.callbacks import Callback # noqa: E402
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/lightning/pytorch/init.py”, line 27, in
from lightning.pytorch.callbacks import Callback # noqa: E402
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/lightning/pytorch/callbacks/init.py”, line 14, in
from lightning.pytorch.callbacks.batch_size_finder import BatchSizeFinder
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/lightning/pytorch/callbacks/batch_size_finder.py”, line 24, in
from lightning.pytorch.callbacks.callback import Callback
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/lightning/pytorch/callbacks/callback.py”, line 22, in
from lightning.pytorch.utilities.types import STEP_OUTPUT
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/lightning/pytorch/utilities/types.py”, line 40, in
from torchmetrics import Metric
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/init.py”, line 14, in
from torchmetrics import functional # noqa: E402
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/functional/init.py”, line 14, in
from torchmetrics.functional.audio._deprecated import _permutation_invariant_training as permutation_invariant_training
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/functional/audio/init.py”, line 14, in
from torchmetrics.functional.audio.pit import permutation_invariant_training, pit_permutate
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/functional/audio/pit.py”, line 22, in
from torchmetrics.utilities import rank_zero_warn
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/utilities/init.py”, line 14, in
from torchmetrics.utilities.checks import check_forward_full_state_property
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/utilities/checks.py”, line 25, in
from torchmetrics.metric import Metric
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/metric.py”, line 30, in
from torchmetrics.utilities.data import (
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/utilities/data.py”, line 22, in
from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_1_12, _XLA_AVAILABLE
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchmetrics/utilities/imports.py”, line 50, in
_TORCHAUDIO_GREATER_EQUAL_0_10: Optional[bool] = compare_version(“torchaudio”, operator.ge, “0.10.0”)
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/lightning_utilities/core/imports.py”, line 73, in compare_version
pkg = importlib.import_module(package)
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchaudio/init.py”, line 1, in
from . import ( # noqa: F401
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchaudio/_extension/init.py”, line 45, in
_load_lib(“libtorchaudio”)
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torchaudio/_extension/utils.py”, line 64, in _load_lib
torch.ops.load_library(path)
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/site-packages/torch/_ops.py”, line 643, in load_library
ctypes.CDLL(path)
File “/home/aeternum/anaconda3/envs/lit/lib/python3.9/ctypes/init.py”, line 382, in init
self._handle = _dlopen(self._name, mode)
OSError: libtorch_cuda.so: cannot open shared object file: No such file or directory
HELP ME RESOLVE IT PLEASE T_T