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

vscode default python interpreter is not the terminal python interpreter #41

Open
thoraxe opened this issue Sep 28, 2023 · 2 comments
Open

Comments

@thoraxe
Copy link

thoraxe commented Sep 28, 2023

The default available/selected interpreter for VSCode itself is /bin/python3.11
The terminal default interpreter is /opt/app-root/bin/python

Because of this, when you install packages with pip install in the terminal (which you have to do), they don't go where vscode is looking for them. This results in pylint using the wrong python which then can't find any of the modules you installed, so all the intellisense things break.

@shalberd
Copy link

I have found a solution for it, will probably first present them in the context of "Visual Studio / Code Server airgapped" PR here.

@shalberd
Copy link

shalberd commented Feb 29, 2024

The key is: creating a settings.json for User settings in a specific User directory under where the PVC is mounted at /opt/app-root/src.

For the non-contrib images in the notebooks subproject, this has already been integrated correctly and solved by @atheo89

opendatahub-io/notebooks@8d23be4

Also passing a certain value / writing it into that settings.json

"python.defaultInterpreterPath": "/opt/app-root/bin/python3"

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