Conda activate not working?

前端 未结 16 1635
失恋的感觉
失恋的感觉 2020-12-02 16:38
 gonzo  ~/a/packages  conda env list
# conda environments:
#
ppo_latest               /nohome/jaan/abhishek/anaconda3/envs/ppo_latest
root                  *  /noh         


        
16条回答
  •  一个人的身影
    2020-12-02 17:05

    I just ran into a similar issue. Recently started developing on windows, so getting used to the PowerShell. Ironically when trying to use 'conda activate ' in Git-bash i got the error

    $ conda activate obf
    
    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 
    
    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'. 
    

    Running the command in my PowerShell (elevated) as instructed did the trick for me.

    conda init powershell 
    

    This should be true across all terminal environments, just strange PowerShell didn't return this error itself.

提交回复
热议问题