-
Notifications
You must be signed in to change notification settings - Fork 92
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
Workbench: Positron new Project cannot use Python versions not on the path? #5341
Comments
This is related to #4270. The Project Wizard only includes positron/src/vs/workbench/browser/positronNewProjectWizard/interfaces/newProjectWizardEnums.ts Lines 39 to 45 in 0108e50
We probably want to create a new command in the Python extension that checks if a given interpreter path is for a global Python installation, and display the interpreter in the Project Wizard interpreter dropdown based on the result. We currently make the runtime filtering decision in the Project Wizard, which currently only recognizes |
On one of our internal instances, I do now see Python 3.12.4 on PATH as Global and it's on the New Project flow 🎉 There still appears to be some lag between overall discovery and this version being made available on the New Project flow, eg if I quickly start a session and try to create a New Project, the Python on PATH may be temporarily excluded. |
### Addresses - #5341 - #4270 ### Implementation - add new command `python.isGlobalPython` to the Python extension - Given a python interpreter path, return whether it is a global python interpreter - remove `RuntimeFilter`, `PythonRuntimeFilter` and `runtimeSource` filtering logic from the Project Wizard, which would require an update to the appropriate enum every time we want to recognize a specific `runtimeSource` as a permitted "Global Python" - rework `_getFilteredInterpreters()` to return all interpreters, only global interpreters, or undefined depending on the current state of the project wizard - add/update log messages in the Project Wizard state handling methods ### QA Notes On Windows, `MicrosoftStore`-installed Python versions should now show in the Project Wizard interpreter dropdown when creating a new Venv. On other operating systems, Global, Pyenv, Unknown and any other "Global" Python installations should show in the Project Wizard interpreter dropdown when creating a new Venv.
QA Notes
|
I'm not seeing this anymore in 2024.12.0-96 |
System details:
Positron and OS details:
Positron Version: 2024.11.0 build 140
Code - OSS Version: 1.93.0
Commit: e0d844b
Date: 2024-10-31T14:13:54.986Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Interpreter details:
Python 3.12.4
Describe the issue:
On a Workbench server that doesn't have Python on the PATH, try to create a new Project with a version of Python in
/opt/python
but not on PATH. Note that the versions in/opt/python
are not discoveredSteps to reproduce the issue:
Expected or desired behavior:
Were there any error messages in the UI, Output panel, or Developer Tools console?
The text was updated successfully, but these errors were encountered: