今天安装了一个新的conda环境,但是一开始运行就出现错误:
Traceback (most recent call last):
File "/home/mapengsen/anaconda3/envs/37/lib/python3.7/site-packages/torch/__init__.py", line 172, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File "/home/mapengsen/anaconda3/envs/37/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/mapengsen/anaconda3/envs/37/lib/python3.7/site-packages/torch/lib/../../nvidia/cublas/lib/libcublas.so.11: undefined symbol: cublasLtHSHMatmulAlgoInit, version libcublasLt.so.11During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 1, in <module>
import torch
File "/home/mapengsen/anaconda3/envs/37/lib/python3.7/site-packages/torch/__init__.py", line 217, in <module>
_load_global_deps()
File "/home/mapengsen/anaconda3/envs/37/lib/python3.7/site-packages/torch/__init__.py", line 178, in _load_global_deps
_preload_cuda_deps()
File "/home/mapengsen/anaconda3/envs/37/lib/python3.7/site-packages/torch/__init__.py", line 158, in _preload_cuda_deps
ctypes.CDLL(cublas_path)
File "/home/mapengsen/anaconda3/envs/37/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/mapengsen/anaconda3/envs/37/lib/python3.7/site-packages/nvidia/cublas/lib/libcublas.so.11: undefined symbol: cublasLtHSHMatmulAlgoInit, version libcublasLt.so.11
解决办法:
pip uninstall nvidia_cublas_cu11
标签:__,undefined,lib,anaconda3,symbol,so.11,init,mapengsen,home
From: https://blog.csdn.net/weixin_43135178/article/details/139886079