[Python] VSCode conda activate base giving CommandNotFoundError

Discussão em 'Python' iniciado por Stack, Abril 9, 2025.

  1. Stack

    Stack Membro Participativo

    I have Anaconda and Visual Studio Code installed on my computer. My default terminal for VS Code is Git Bash. When I open a new terminal in VSCode, it immediately runs the following commands:

    C:/Users/ethan/AppData/Local/Continuum/anaconda3/Scripts/activate
    conda activate base


    The second of these commands gives the following error:

    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'.


    I have tried running conda init bash and conda init --all both inside the VSCode terminal, and inside Git Bash. It handles that command fine, but it doesn't solve my problem. I don't know if the second line of the error applies to me, but even if it did, I don't know how to change the command being called because it is done automatically by VSCode. This error occurs every time I launch a terminal in VSCode (even if I don't have any python files present in my workspace), and it happens both when I launch VSCode from the launch button in Anaconda Navigator and when I launch VSCode by itself.

    Continue reading...

Compartilhe esta Página