运行 conda 在我的 ubuntu 服务器上以管理员身份安装,我得到 "Missing write permissions: /home/ubuntu/anaconda3"

Running conda install as an admin on my ubuntu server, I get "Missing write permissions: /home/ubuntu/anaconda3"

我已经在我的 ubuntu 服务器上安装了 Anaconda3。 当我尝试使用 conda 安装或升级任何软件包时,例如:

conda install numpy=1.11.0

(当然不能"sudo conda")

我收到以下错误:

Error: Missing write permissions in: /home/ubuntu/anaconda3
#
# You don't appear to have the necessary permissions to install packages
# into the install area '/home/ubuntu/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=/home/ubuntu/anaconda3

正如@cel 指出的那样,提供正确的权限就足够了:

sudo chown -R ubuntu /home/ubuntu/anaconda3 
sudo chmod -R +x /home/ubuntu/anaconda3