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

[BUG] Unable to select default Python env #1483

Open
twsl opened this issue Dec 12, 2024 · 6 comments
Open

[BUG] Unable to select default Python env #1483

twsl opened this issue Dec 12, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@twsl
Copy link

twsl commented Dec 12, 2024

Describe the bug
I run my project in a docker devcontainer. I have poetry setup already, yet I am not able to select any default Python environment, but need to create a .venv or conda env

To Reproduce
Steps to reproduce the behavior:

  1. Set up Python env

Screenshots
If applicable, add screenshots to help explain your problem.

System information:

  1. Paste the output ot the Help: About command (CMD-Shift-P).
Version: 1.95.3 (system setup)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22621
  1. Databricks Extension Version
    v2.4.8

Databricks Extension Logs
Please attach the databricks extension logs

Additional context
Add any other context about the problem here.

@twsl twsl added the bug Something isn't working label Dec 12, 2024
@ilia-db
Copy link
Contributor

ilia-db commented Dec 12, 2024

Hi, we utilise python extension API for env selection. Can you select your environment for a python file using the python extension?

Either click here when a python file is open (you might already have something selected there):
Screenshot 2024-12-12 at 13 09 53

Or execute this command: Python: Select Interpreter

Which will lead to this UI:
Screenshot 2024-12-12 at 13 10 07

Do you see your environment in that selection UI?
If not, you still have an option to enter the path to your environment's python executable manually.

Also keep in mind that even if you select the environment, we might still show a warning in our Databricks panel if the python version there doesn't match the DBR requirements of your cluster (usually it's either 3.10 or 3.11).

@twsl
Copy link
Author

twsl commented Dec 13, 2024

I'm talking about this env selection
image
only the newly created venv seems to work
image

@ilia-db
Copy link
Contributor

ilia-db commented Dec 13, 2024

Do I understand correctly, that the Poetry venv in the list on your screenshot doesn't work? Or that is a newly created venv? Does existing vent work when you manually enter a path to its python executable? (by clicking on Enter interpreter path)

@twsl
Copy link
Author

twsl commented Dec 13, 2024

the venv is the newly created one, when the setup asked me to create one. the rest of the python envs are shown when i clicked on Use Python Extension to setup environments. My issue is, that I cannot select my default Python env provided by the devcontainer/selected in the python.defaultInterpreterPath variable

@ilia-db
Copy link
Contributor

ilia-db commented Dec 18, 2024

My issue is, that I cannot select my default Python env provided by the devcontainer/selected in the python.defaultInterpreterPath variable

Does python extension sees your default venv? E.g can you open any py or ipynb files and run it using your default environment?

Also, on the screenshot I see that python.defaultInterpreterPath is located in the /usr/local/bin/python - is that the expected path? Does it mean that in the dev container you don't actually have a virtual environment, but use the "global" (to the container) interpreter? In that case we indeed won't "accept" it, as right now we require a virtual environment

@twsl
Copy link
Author

twsl commented Dec 18, 2024

Exactly, my devcontainer does not have a venv and uses the global interpreter as the environment separation is provided by the docker container already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants