3

I have installed (Mini) Conda in an Ubuntu 20.04 instance running on WSL2, and I have created a virtual environment (myenv).

First, the path to the interpreter does not appear when I perform Python: Select Interpreter, so I have manually inserted it.

However, upon opening a new instance of the terminal, source activate myenv is not automatically run. I think VSCode is not aware that I am working with WSL2 (e.g. when opening the dialog box for selecting the interpreter, it searches only for windows executables).

Has someone encountered the problem and solved it?

aretor
  • 2,379
  • 2
  • 22
  • 38
  • 1
    Can you now see a WSL indicator in the bottom left corner? Have you looked at [this](https://code.visualstudio.com/docs/remote/wsl) page? – Steven-MSFT Mar 28 '22 at 06:43
  • Thanks, I fixed it, by clicking on the bottom left corner, selecting `New WSL Window using Distro...` and then selecting my WSL Ubuntu distro. VSCode was only opening the WSL terminal, but it was running locally on Windows. – aretor Mar 28 '22 at 08:57

0 Answers0