700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > CUDA11.2 安装pytorch报错:ERROR: Could not install packages due to an OSError: [Errno 2] No such file or

CUDA11.2 安装pytorch报错:ERROR: Could not install packages due to an OSError: [Errno 2] No such file or

时间:2020-04-04 01:56:33

相关推荐

CUDA11.2 安装pytorch报错:ERROR: Could not install packages due to an OSError: [Errno 2] No such file or

ubuntu服务器CUDA版本为11.2,查询官网发现pytorch没有对应版本,直接安装CUDA11.3版本的torch:

pip3 install torch torchvision torchaudio --extra-index-url /whl/cu113

报错如下:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/root/anaconda3/envs/mmdetection/lib/python3.7/site-packages/torch/_C.cpython-37m-x86_64-linux-gnu.so'

此报错与pytorch版本和cuda版本不对应无关,是权限不足引发的报错,解决方法为在pip install后面加上--user:

pip3 install --user torch torchvision torchaudio --extra-index-url /whl/cu113

torch安装成功,代码能够成功运行,没有与CUDA版本不兼容的问题!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。