How do I run Anaconda prompt with administrator privileges?

Question:

I’m new to python, Anaconda, and programming in general. My OS is Windows 10. I recently installed Anaconda3 to get Python, but mostly to install a package via conda-forge. My problem starts when I execute the command:

conda install -c conda-forge x

With x being the package I want to install.
When I do, at some point I get this error:

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

I’m pretty sure my problem solves quite easily if I run the anaconda prompt with administrator privileges, but I run it using the “Anaconda Navigator”, so I don’t know if running the navigator as an administrator and then launching the prompt from there would solve my problem…is there another option?

I would really appreciate any information about this, because it may solve my problem and also teach me something about the conda environment.

Answers:

Go to C:ProgramDataAnaconda3, press and hold or right-click the folder, and then tap or click Properties. Tap or click the Security tab. Under Group or user names, tap or click your name to see the permissions that you have. Tap or click Edit, tap or click your name, select the check boxes for the permissions that you must have, and then click OK. Ensure you apply changes to sub folders.

Answered By: Sola Oshinowo

By default, the command line of the prompt of Anaconda looks like cmd.exe /k "activate "<path-to-anaconda3>envs<environment name>" & ", so you can open it by using cmd with Administrator privilege, or add a profile for it if you are using Windows Terminal.

Answered By: zeze
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.