Skip to content

Instantly share code, notes, and snippets.

@dsaad68
Forked from martinsotir/conda_4.6_powershell.md
Last active July 27, 2023 13:15
Show Gist options
  • Save dsaad68/95a39194a2f14cf72eaee3b6220d6698 to your computer and use it in GitHub Desktop.
Save dsaad68/95a39194a2f14cf72eaee3b6220d6698 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