Updating Anaconda fails: Environment Not Writable Error

前端 未结 14 1931
萌比男神i
萌比男神i 2020-12-23 19:54

I\'m trying to update Anaconda and its packages using conda update --name root conda, but it fails every time.

Error message : Environme

14条回答
  •  礼貌的吻别
    2020-12-23 20:13

    If you get this error under Linux when running conda using sudo, you might be suffering from bug #7267:

    When logging in as non-root user via sudo, e.g. by:

    sudo -u myuser -i
    

    conda seems to assume that it is run as root and raises an error.

    The only known workaround seems to be: Add the following line to your ~/.bashrc:

    unset SUDO_UID SUDO_GID SUDO_USER
    

    ...or unset the ENV variables by running the line in a different way before running conda.

    If you mistakenly installed anaconda/miniconda as root/via sudo this can also lead to the same error, then you might want to do the following:

    sudo chown -R username /path/to/anaconda3
    

    Tested with conda 4.6.14.

提交回复
热议问题