当我得到
时尝试运行脚本(infacepytorch) ryan@ryan-7570:/media/ryan/shakira/InsightFace_Pytorch$ python face_verify.py
Traceback (most recent call last):
File "face_verify.py", line 9, in <module>
from Learner import face_learner
File "/media/ryan/shakira/InsightFace_Pytorch/Learner.py", line 1, in <module>
from data.data_pipe import de_preprocess, get_train_loader, get_val_data
File "/media/ryan/shakira/InsightFace_Pytorch/data/data_pipe.py", line 12, in <module>
import mxnet as mx
File "/home/ryan/virtualenvs/infacepytorch/lib/python3.5/site-packages/mxnet/__init__.py", line 24, in <module>
from .context import Context, current_context, cpu, gpu, cpu_pinned
File "/home/ryan/virtualenvs/infacepytorch/lib/python3.5/site-packages/mxnet/context.py", line 24, in <module>
from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
File "/home/ryan/virtualenvs/infacepytorch/lib/python3.5/site-packages/mxnet/base.py", line 213, in <module>
_LIB = _load_lib()
File "/home/ryan/virtualenvs/infacepytorch/lib/python3.5/site-packages/mxnet/base.py", line 204, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/usr/lib/python3.5/ctypes/__init__.py", line 347, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libcudart.so.9.2: cannot open shared object file: No such file or directory
我尝试过
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64 && sudo ldconfig
但我仍然遇到相同的错误, 任何建议都会非常有帮助,谢谢。
答案 0 :(得分:1)
正如爪子所指出的,您正在运行的一个MXNet版本取决于Cuda-9.2。最好安装Cuda-9.2并将库路径更新为指向9.2。
如果您无法更新Cuda依赖项,也可以使用pip软件包mxnet-cu90
安装MXNet for 9.0。