转自http://blog.csdn.net/m0_37733057 http://blog.csdn.net/m0_37733057/article/details/77679714
用conda安装pytorch的时候,老是出现问题,后面使用conda安装其他软件时,提示conda需要更新,但是更新时,数据包能够下载下来,安装时就出现下类问题:
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(481): An error occurred while uninstalling package 'defaults::setuptools-38.4.0-py36_0'.
PermissionError(13, 'Permission denied')
Attempting to roll back.
Rolling back transaction: done
PermissionError(13, 'Permission denied')
试很多方法之后,发现另一个博主的方法很有效,在这里推荐给大家:
jiangmignzhi@jiangmignzhi-X555LB:~$ sudo chown -R marley:marley /home/marley/anaconda3
marley是自己的用户名,输入之后,敲击回车,我的问题就解决了
jiangmignzhi@jiangmignzhi-X555LB:~$ conda upgrade --allSolving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.4.10
latest version: 4.4.11
Please update conda by running
$ conda update -n base conda
## Package Plan ##
environment location: /home/jiangmignzhi/anaconda3
The following packages will be UPDATED:
certifi: 2018.1.18-py36_0 defaults --> 2018.1.18-py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
setuptools: 38.4.0-py36_0 defaults --> 38.4.0-py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
The following packages will be DOWNGRADED:
future: 0.16.0-py36_1 defaults --> 0.16.0-py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libffi: 3.2.1-hd88cf55_4 defaults --> 3.2.1-3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tk: 8.6.7-hc745277_3 defaults --> 8.6.7-0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
xz: 5.2.3-h55aa19d_2 defaults --> 5.2.3-0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
zlib: 1.2.11-ha838bed_2 defaults --> 1.2.11-0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
成功搞定!!!