Skip to content

Instantly share code, notes, and snippets.

@Magnus167
Last active May 9, 2023 07:28
Show Gist options
  • Save Magnus167/7f5bec43e7a95bc133588e6d19ea6d69 to your computer and use it in GitHub Desktop.
Save Magnus167/7f5bec43e7a95bc133588e6d19ea6d69 to your computer and use it in GitHub Desktop.
Setting up conda in powershell for Windows, activating on powershell startup

First, look at

Enabling conda in Windows Powershell

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

https://stackoverflow.com/a/65160772/4417821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment