Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not using right conda install python interpreter on WSL2 #3

Open
sdandona opened this issue Jul 19, 2023 · 1 comment
Open

not using right conda install python interpreter on WSL2 #3

sdandona opened this issue Jul 19, 2023 · 1 comment

Comments

@sdandona
Copy link

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.

@sdandona sdandona changed the title not using right conda install on WSL2 not using right conda install python interpreter on WSL2 Jul 19, 2023
@mikeybythebeach
Copy link

Thanks Sangeet, I was stuck on this issue for a little while and your post was super helpful to resolve it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants