Skip to content

Instantly share code, notes, and snippets.

@vcasadei
Forked from martinsotir/conda_4.6_powershell.md
Created June 12, 2024 17:26
Show Gist options
  • Save vcasadei/54bf002385a76cc595db783de02fd863 to your computer and use it in GitHub Desktop.
Save vcasadei/54bf002385a76cc595db783de02fd863 to your computer and use it in GitHub Desktop.
Enable conda in powershell

Enabling conda in Windows Powershell

First, in an administrator command prompt, enable unrestricted Powershell script execution (see About Execution Policies):

set-executionpolicy unrestricted

Then makes sure that the conda Script directory in is your Path. For instance, with miniconda: %USERPROFILE%\Miniconda3\Scripts.

In a regular Powershell prompt check if conda is working, and update to latest version:

conda update conda
conda --version
# should be conda 4.6.1 or newer

Setup conda for Powershell using the following command:

conda init powershell

Finally, restart powershell. An initialisation script is run every time Powershell starts. You should now be able to activate environment with:

conda activate <my-env>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment