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

Python environments that don't have 'pip' or 'ipykernel' cannot be used #5505

Closed
jmcphers opened this issue Nov 25, 2024 · 2 comments
Closed
Assignees

Comments

@jmcphers
Copy link
Collaborator

Positron uses pip to install ipykernel if it is missing. However, this doesn't work if pip itself is not present; Positron tries to install ipykernel but fails because pip is missing, rendering the environment unusable.

When we have an environment in this state we should do one of two things:

  • Exclude the environment entirely (perhaps it is e.g. a system installation that is not meant to install user packages)
  • Form an install chain that installs pip and then ipykernel (a cursory glance suggests there is instrumentation in the Python extension to bootstrap pip itself)
@jmcphers jmcphers added lang: python area: workbench Issues related to Workbench category. labels Nov 25, 2024
@juliasilge juliasilge added this to the 2025.02.0 Pre-Release milestone Dec 2, 2024
@petetronic petetronic added the area: core Issues related to Core category. label Jan 7, 2025
@petetronic petetronic removed area: core Issues related to Core category. area: workbench Issues related to Workbench category. labels Jan 14, 2025
@petetronic
Copy link
Collaborator

While we have experienced this in workbench, this would benefit any environment, marking for the python team to look at.

@samclark2015 samclark2015 self-assigned this Jan 15, 2025
@samclark2015 samclark2015 linked a pull request Jan 16, 2025 that will close this issue
@samclark2015 samclark2015 removed a link to a pull request Jan 16, 2025
samclark2015 added a commit that referenced this issue Jan 22, 2025
When selecting an interpreter missing ipykernel, the UI prompt now
states that both Pip and ipykernel must be installed. `ProductInstaller`
logic was modified to pass flags to enable Pip to be installed
automatically. Additional flags were set in `ProductInstaller` to enable
the Pip install to respect the `python.installModulesInTerminal`
setting.

Addresses #5505
@jonvanausdeln
Copy link
Contributor

Verified Fixed

Positron Version(s) : 2025.02.0-112
OS Version(s) : Windows 11

Test scenario(s)

pip and ipykernel get installed as expected!

Link(s) to TestRail test cases run or created:

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants