导入错误:libcupti.so.11.5:无法打开共享对象文件:没有这样的文件或目录

Fun*_*yer 6 linux cuda manjaro pytorch

我在使用torch包时遇到了这个错误。

---------------------------------------------------------------------------
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
Run Code Online (Sandbox Code Playgroud)

我的系统是manjaro KDE 20.1。我记得这几天我更新了系统。我的CUDA版本如下:

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                                                 |
+-----------------------------------------------------------------------------+

Run Code Online (Sandbox Code Playgroud)

我应该如何解决这个问题?