How can I activate a Conda environment from PowerShell?

You don’t need administrator permissions.

Once you install Anaconda or Miniconda on Windows, open a Anaconda PowerShell Prompt from Start Menu.

Or, if you don’t see it there, then assuming you have installed
miniconda3 at path C:\miniconda3\4.9.2, do:

powershell -ExecutionPolicy ByPass -NoExit -Command "& 'C:\miniconda3\4.9.2\shell\condabin\conda-hook.ps1' ; conda activate 'C:\miniconda3\4.9.2' "

Now try:

conda init powershell

and reopen PowerShell.

Additional note: By default, conda will autoactivate itself, when we open terminal. If you prefer not, then disable auto-activation with:

conda config --set auto_activate_base false

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)