Why do I get EnvironmentNotWritableError while installing eli5

11,672

Solution 1

Windows : Open a Anaconda Power shell promt (using Windows search) as administrator and type in conda install -c conda-forge eli5, if the command freezes after a while, press Ctrl + C and it will continue with collecting package metadata.

Solution 2

You need to create a new environment and activate it, and then try installing the package from that environment using the below code

conda create --name myenv
conda activate myenv

Solution 3

I had this very error when updating conda:

conda update conda

To run the Anaconda Power shell prompt as administrator you need to right click the menu item first.

It allowed the update to write to the location: C:\ProgramData\Anaconda3

Solution 4

For me the trick was: Right click on Anaconda Navigator -> run as Administrator. Now any prompt/terminal started from the navigator (e.g. by clicking on the play button and start a terminal) runs with administrator privileges.

Share:
11,672
Ang Sheng Jun
Author by

Ang Sheng Jun

Updated on July 25, 2022

Comments

  • Ang Sheng Jun
    Ang Sheng Jun over 1 year

    I'm new to Python (1 month into Python). Trying to install eli5 to Python. I used

    conda install -c conda-forge eli5
    

    Got error message

    EnvironmentNotWritableError: The current user does not have write permissions to the target environment. environment location: C:\ProgramData\Anaconda3

    Appreciate assistance, thanks.

    Per https://anaconda.org/conda-forge/eli5, I have tried

    1. conda install -c conda-forge eli5
    2. conda install -c conda-forge/label/gcc7 eli5
    3. conda install -c conda-forge/label/cf201901 eli5

    All returned same message.

  • Ishrak
    Ishrak about 2 years
    My original problem was that I needed administrator privileges to install packages in a privileged directory, when using the base environment. But, creating my own environment ensured that the packages were being installed in a non-privileged directory where I have write permission. This answer solved my problem.
  • zeit
    zeit almost 2 years
    @Ishrak Same problem here, mine solved too.