Pytorch

发布时间 2023-07-13 01:57:49作者: Alan-Blog

安装Pytorch

根据配置生成安装命令

https://pytorch.org/get-started/locally/
因为我使用的是笔记本,所以仅安装cpu版本

conda install pytorch torchvision torchaudio cpuonly -c pytorch

报错解决

  1. 无写入权限
EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
  environment location: /opt/anaconda3
  uid: 1000
  gid: 1000
sudo chown -R user anaconda3 #因为安装时我没有安装到用户目录下,所以没有权限