Skip to content

not using right conda install python interpreter on WSL2 #3

@sdandona

Description

@sdandona

I was going through this tutorial and following along with this youtube video as well:

Beyond Jupyter Notebooks (Windows 11/WSL2): MLOps Environment Setup & First Deployment
https://www.youtube.com/watch?v=C7fBf33nQ7E

In the part of both the tutorial and the video, in the section where you're supposed to select the python interpreter on vscode, both the tutorial and the video select an interpreter located on windows and not the one installed on ubuntu on WSL. The reason for this is that you selected a python.exe file which does not exist in the ubuntu conda environment. Both the tutorial and the video are not using the python interpreter from the conda environment on ubuntu but the one on windows.

You should update the tutorial to include that the WSL extension needs to be installed on vscode and that you need to remote into ubuntu on WSL as shown in the following articles:

How to Set Up VS Code with WSL 2 on Windows 10 and 11
https://www.makeuseof.com/how-to-set-up-vs-code-with-wsl-2-windows-10-11/#:~:text=Navigate%20to%20the%20project%20directory,app%20in%20the%20Linux%20environment.

Remote development in WSL
https://code.visualstudio.com/docs/remote/wsl-tutorial#_python-development

How to refer to UNIX-Python-executable in "select interpreter" in VS Code instead of .exe? #20839
microsoft/vscode-python#20839

Once you remote into WSL2 from vscode (or run it from the terminal using code .) then you can select the interpreter that was installed in the ubuntu conda install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions