我的操作系统是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。
谢谢你帮我。
1条答案
按热度按时间bhmjp9jg1#
问题通过PyTorch中的PR解决,见此处:
https://discuss.pytorch.org/t/import-torch-fails-with-fresh-conda-installation/168167