解决ubuntu16.04 conda install出现permission denied的问题

conda install xxx, 出现 :

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.)
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容