Skip to content

Instantly share code, notes, and snippets.

@Magnus167
Forked from martinsotir/conda_4.6_powershell.md
Created September 23, 2022 09:37
Show Gist options
  • Save Magnus167/04b5a3179f2945d296f1c12fa704a50b to your computer and use it in GitHub Desktop.
Save Magnus167/04b5a3179f2945d296f1c12fa704a50b 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>
@Magnus167
Copy link
Author

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