Python Forum
Error: How to to close and restart your shell after running 'conda init' - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Error: How to to close and restart your shell after running 'conda init' (/thread-27132.html)



Error: How to to close and restart your shell after running 'conda init' - angelica - May-27-2020

Hi,

I'm a newbie in Python but not to programming. I have Anaconda3 and VS Code 3.7 installed on Windows OS. I am getting this error message and although I did my searching, I am still unable to resolve the error. Can some help with simple steps please? Thank you.


Quote:PS C:\Users\........\Python> conda activate DataScience

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.

To initialize your shell, run

$ conda init <SHELL_NAME>

Currently supported shells are:
- bash
- cmd.exe
- fish
- tcsh
- xonsh
- zsh
- powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.



RE: Error: How to to close and restart your shell after running 'conda init' - Calli - May-27-2020

try conda deactivate to deactivate and conda activate to activate


RE: Error: How to to close and restart your shell after running 'conda init' - angelica - May-27-2020

Hi,

Thanks for your reply. Error still active. :)


RE: Error: How to to close and restart your shell after running 'conda init' - snippsat - May-27-2020

You most activate (base) first.
G:\Anaconda3
λ G:\Anaconda3\Scripts\activate

(base) G:\Anaconda3
λ conda activate pink_env

(pink_env) G:\Anaconda3
Without activate base for Scripts folder.
Now don't use conda.
G:\Anaconda3\Scripts
λ activate pink_env

(pink_env) G:\Anaconda3\Scripts
λ
So this is when using cmder or powershell most do it like this.
If using Anaconda Prompt it automatically activate base.
(base) C:\Users\Tom>
Of course i can not use Anaconda Prompt as it just cmd,an cmder is shell that's a lot better.