Conda activate base error - The term "conda" is not recongised

Viewed 4563

I'm trying to use anaconda with visual studio code but keep getting this error message every time I try to run something.

enter image description here

enter image description here

What Iv'e tried/confirmed:

Python 3.9.1 is installed and Iv'e got no problems running codes in VSC when I use the standard enviroment or inside a command terminal.

The version of python the anacoanda says it is using is 3.8.5. Should it be 3.9.1 or is that normal?

Python and anaconda were added to path during installation - Iv'e already made that mastake before.

Presumably anaconda is installed properly. I can access the navigator and command prompt.

Its not the code that Iv'e writen. I tried simply writing print("Hello") and it gives me the same error.

Installed the latest version of anaconda.

1 Answers

I have encountered the same problem. The reason is that VS Code uses the powershell terminal by default, but powershell does not activate the conda environment by default.

Therefore, it is recommended that you use the cmd terminal or other terminals that come with the system. (Because in VS Code, the terminal it uses is to integrate the terminal from the system and it not only supports the powershell terminal.)

Solution: for example, switch to using cmd terminal:

enter image description here

enter image description here

Reference: Integrated terminal in VS Code.

Related