如何在Ubuntu 22.04上正确安装带有Anaconda的PyTorch

0g0grzrc  于 2022-12-18  发布在  其他
关注(0)|答案(1)|浏览(267)

我的操作系统是Ubuntu 22.04
我只从Anaconda3-2022.10-Linux-x86_64.sh安装Anaconda,然后运行conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
那么,import torch给出

File “/home/fenaux/anaconda3/lib/python3.9/site-packages/torch/init.py”, line 191, in
_load_global_deps()

File “/home/fenaux/anaconda3/lib/python3.9/site-packages/torch/init.py”, line 153, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)

File “/home/fenaux/anaconda3/lib/python3.9/ctypes/init.py”, line 382, in init
self._handle = _dlopen(self._name, mode)

OSError: libcufft.so.10: cannot open shared object file: No such file or directory

当我签入anaconda3/lib时,我只找到libcufft.so.11。我也尝试了conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia,结果完全相同。我没有其他环境,也没有安装PyTorch。
谢谢你帮我。

相关问题