ubuntu conda install ERROR missing write permission错误

reference:
https://askubuntu.com/questions/726184/missing-write-permissions-in-home-user-anaconda2

报错:

CondaIOError: Missing write permissions in: /usr/local/anaconda3
#
# You don't appear to have the necessary permissions to install packages
# into the install area '/usr/local/anaconda3'.
# However you can clone this environment into your home directory and
# then make changes to it.
# This may be done using the command:
#
# $ conda create -n my_root --clone="/usr/local/anaconda3"

问题在于 anaconda所在文件夹只有root 才有权限,而 sudo 对于conda没用,解决方案是修改文件夹权限给当前用户

sudo chown -R usr foldername

比如我的用户名是 adrianna, anaconda 的安装目录是/usr/local/anaconda3:

adrianna@adrianna-ubuntu:~$ sudo chown -R adrianna /usr/local/anaconda3

你可能感兴趣的:(错误error)