conda install xxx, 出現(xiàn) :
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.4.10
latest version: 4.5.9
Please update conda by running
$ conda update -n base conda
## Package Plan ##
environment location: /home/ai/anaconda3
added / updated specs:
- pytorch
- torchvision
The following NEW packages will be INSTALLED:
cudatoolkit: 9.0-h13b8566_0
ninja: 1.8.2-py36h6bb024c_1
pytorch: 0.4.1-py36_cuda9.0.176_cudnn7.1.2_1 soumith
torchvision: 0.1.9-py36h7584368_1 soumith
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(481): An error occurred while installing package 'defaults::cudatoolkit-9.0-h13b8566_0'.
PermissionError(13, 'Permission denied')
Attempting to roll back.
Rolling back transaction: done
PermissionError(13, 'Permission denied')
AssertionError()
解決辦法:
sudo chown -R user anaconda3
# where user is the username, and anaconda3 is the folder where anaconda has been installed on ubuntu 16.04.)