10

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.

tschomacker
  • 631
  • 10
  • 18
Ang Sheng Jun
  • 131
  • 1
  • 1
  • 7

5 Answers5

6

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.

Jan Pansky
  • 154
  • 2
  • 8
4

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
  • 2
    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. – Ishrak Aug 27 '21 at 02:31
  • 1
    @Ishrak Same problem here, mine solved too. – zeit Jan 27 '22 at 09:18
1

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

JedB
  • 463
  • 4
  • 7
1

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.

tschomacker
  • 631
  • 10
  • 18
0

Use sudo command:

sudo conda install <package>
Anurag Dabas
  • 23,866
  • 9
  • 21
  • 41
bmalbusca
  • 353
  • 1
  • 4
  • 15