ImportError: libcupti.so.11.5: cannot open shared object file: No such file or directory [closed]
Asked Answered
S

0

7

I encountered this error when using torch package.

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Input In [12], in <module>
      1 import random
----> 2 import torch
      3 from torch import nn, optim
      4 # import skopt

File /usr/lib/python3.10/site-packages/torch/__init__.py:197, in <module>
    195     if USE_GLOBAL_DEPS:
    196         _load_global_deps()
--> 197     from torch._C import *  # noqa: F403
    199 # Appease the type checker; ordinarily this binding is inserted by the
    200 # torch._C module initialization code in C
    201 if TYPE_CHECKING:

ImportError: libcupti.so.11.5: cannot open shared object file: No such file or directory

My system is manjaro KDE 20.1. I remember I updated the system these days. My CUDA version is as follows:

Thu Feb 10 02:23:07 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.47.03    Driver Version: 510.47.03    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| 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 ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   41C    P0    11W /  N/A |      0MiB /  8192MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

How should I solve this problem?

Sapir answered 9/2, 2022 at 10:27 Comment(2)
For the record, I just ran into the same problem on my own arch build. It's because CUDA packages updated but pytorch and torchvision packages haven't yet. Torch packages are still looking for CUDA 11.5 libraries. Until the torch packages are updated, your best bet is to downgrade to CUDA 11.5. If you don't still have it in your /var/cache/pacman/pkg directory, you can download a snapshot from the Arch Linux Archive.Vardar
Thanks, I have fixed this bug now, I built a new venv for python3.7 and installed torch, it's works correctly for my system now.Sapir

© 2022 - 2024 — McMap. All rights reserved.