I have two environments in anaconda, namely: root
, 2env
. When I open anaconda prompt, I can switch from root
to 2env
by typing: activate 2env
. I also have conda in my powershell, but when I open powershell and try to run conda activate 2env
it gives the following error:
CommandNotFoundError: 'activate'
Any suggestions on how to fix this?
To activate your Conda environment, type source activate <yourenvironmentname> . Note that conda activate will not work on Discovery with this version. To install a specific package, type conda install -n <yourenvironmentname> [package] . To deactivate the current, active Conda environment, type conda deactivate .
Reload Window from Command Palette, select base:conda as python interpreter then press Ctrl+Shift+` to open a new integrated Terminal, conda environment should be activated automatically in it.
Go to the start menu, right-click 'Anaconda Prompt' and go to file location. Open its properties & change the target to the location of your preferred environment.
Although Conda previously did not support PowerShell, this is now resolved in Conda 4.6.
After adding Anaconda3/Scripts/
to your PATH variable, you should be able to initialize Conda for use with powershell with:
conda init powershell
Afterwards, you can use conda
normally:
conda activate base
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With