skip to Main Content

I mainly use VSCode and Anaconda for my Python Development. I’ve always been more comfortable with bash scripting rather than powershell, so my default terminal is Git Bash (for Windows). Outside of VSCode, things run smoothly, but if I want to execute a script in a different environment, my terminal can’t seem to find the conda command.

Terminal view of conda call

As you can see, if I run which conda it returns the correct path. But if I try to just execute conda it tries to use a path that starts with /cygdrive/. I’ve deleted that a while ago, and conda works just fine in my external terminals just fine. This only occurs in VSCode’s integrated terminal. Any idea how to fix this?

I’ve tried searching through the terminal settings in VSCode but can’t seem to find a proper setting. If possible I’d like to avoid a reinstall.

2

Answers


  1. In the second case it’s trying to run conda.exe but the returned path just ended with conda with no explicit file ending. Command prompts can get very fussy about that sort of stuff, and since MinGW is supposed to emulate Unix to a degree, there’s a chance that the conda file isn’t actually an .exe file to begin with. Make sure there’s specifically a conda.exe file in your Scripts folder.

    Login or Signup to reply.
  2. This may be related to your environment variables, make sure the conda path already exists in the environment variable path. In addition, you can also add parameters to the terminal using the following setting in vscode.

      "terminal.integrated.env.windows": {
          },
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search