Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get EnvironmentNotWritableError while installing eli5

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.

like image 659
Ang Sheng Jun Avatar asked May 12 '19 10:05

Ang Sheng Jun


4 Answers

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.

like image 164
Jan Pansky Avatar answered Oct 18 '22 06:10

Jan Pansky


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
like image 34
Debjyoti Banerjee Avatar answered Oct 18 '22 07:10

Debjyoti Banerjee


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

like image 37
JedB Avatar answered Oct 18 '22 05:10

JedB


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.

like image 1
tschomacker Avatar answered Oct 18 '22 07:10

tschomacker