I just installed WSL 2, I’m using remote WSL extension in vscode.
Whenever I open any .py or .ipynb file, it opens in the default window global environment and I have to manually switch to base conda env.
Is there a way to make this my default env?
2
Answers
Not sure what the issue is. If you open the code from wsl 2 command line with command "code ." (you need to be in the desired project folder), then press "ctrl shift p" and click "Python: Select Interpreter" and choose the needed conda env from the list (this will be the list of conda env installed in the wsl 2), this will set the conda env and code will automatically select it every time you open this particular project.
your question is a bit vague but since I had such an issue before, I think I know what you mean.
just by installing WSL extension in vscode everything will become clear. it will automatically connect to your wsl distribution and its shell. and you can see its notification in the lower left corner of the window.