I have installed Anaconda without checking Add Anaconda3 to my PATH (as recommended).
However, when I open Terminal in VS Code or PowerShell in Windows AND try to run conda commands I experience -> 'Conda' is not recognized as an internal or external command
I had to use Anaconda Prompt Terminal to run conda commands, which was inconvenient.
Here is how I have fixed that
- Open Anaconda Prompt
- Run the following command
- conda init powershell
Now I can run PowerShell Terminal or Terminal in VS Code, which will open the base Conda environment. Now that the conda command is recognizable, I can activate the necessary environment, create a new one, etc.
P.S. -> "conda init powershell" will change the PowerShell profile file to hook the Anaconda Prompt and PowerShell Shell. Here is the code added to PowerShell profile file.
#region conda initialize # !! Contents within this block are managed by 'conda init' !!
If (Test-Path "F:\Anaconda\Scripts\conda.exe") {
(& "F:\Anaconda\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | ?{$_} | Invoke-Expression }
#endregion