Python Forum
Error: How to to close and restart your shell after running 'conda init'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: How to to close and restart your shell after running 'conda init'
#1
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'.
Reply
#2
try conda deactivate to deactivate and conda activate to activate
Reply
#3
Hi,

Thanks for your reply. Error still active. :)
Reply
#4
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  error "cannot identify image file" part way through running hatflyer 0 613 Nov-02-2023, 11:45 PM
Last Post: hatflyer
  Error when running kivy on python janeik 8 1,923 Jun-16-2023, 10:58 PM
Last Post: janeik
  Confused over Conda Package manager vs PIP JanOlvegg 3 1,161 Mar-09-2023, 02:09 PM
Last Post: JanOlvegg
  Getting error when running "MINUS" between 2 databases marlonbown 4 1,217 Nov-10-2022, 05:49 AM
Last Post: deanhystad
  How to deactivate correctly a conda environment NoNameoN 2 1,807 Nov-04-2022, 01:43 PM
Last Post: NoNameoN
  PyRun_SimpleFile calling multiprocessing Python Class cause endless init loop Xeno 2 988 Sep-19-2022, 02:32 AM
Last Post: Xeno
  Error while running code on VSC maiya 4 3,547 Jul-01-2022, 02:51 PM
Last Post: maiya
  Pandas - error when running Pycharm, but works on cmd line zxcv101 1 1,321 Jun-18-2022, 01:09 PM
Last Post: snippsat
  Error when running a matplot lib example aurelius_nero 3 6,686 Apr-24-2022, 01:24 PM
Last Post: Axel_Erfurt
  Init an indefinite number of class MathisDELAGE 9 2,226 Feb-18-2022, 07:49 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020