positron icon indicating copy to clipboard operation
positron copied to clipboard

Python Environments extension should NOT be installed in Positron

Open rodrigosf672 opened this issue 1 year ago • 10 comments

System details:

Positron and OS details:

Positron Version: 2025.12.0 build 25
Code - OSS Version: 1.105.0
Commit: 3d872c29faa9fb11833dd474d9bf549d7320bebb
Date: 2025-11-04T07:19:38.997Z
Electron: 37.6.0
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.0.0

Session details:

Python 3.13.9

Describe the issue:

  • Users do NOT remember installing this extension.
  • Extension should NOT be installed by default.
  • Enabling such installation may lead to issues like the constant 'Initializing virtual environments...' in the footer.

Steps to reproduce the issue:

  1. Go to Extensions tab and check if you have Python Environments extension installed.

Expected or desired behavior:

Extension should NOT be installed within Positron. This extension should be part of a blocked extension list.

Were there any error messages in the UI, Output panel, or Developer Tools console?

'Initializing virtual environments...' in the footer of Positron and sometimes as a toast message.

rodrigosf672 avatar Nov 06 '25 17:11 rodrigosf672

@austin3dickey Logged this as an enhancement request, but please feel free to change it to a bug if you think so. Also, please feel free to chime in with more details. Thanks for nailing this down to this extension, Austin! cc @juliasilge

rodrigosf672 avatar Nov 06 '25 17:11 rodrigosf672

We already have a list of extensions that are disallowed, and we can add it to that.

We still don't know how this is getting installed, though.

juliasilge avatar Nov 12 '25 21:11 juliasilge

I suspect it's when you install an extension that depends on ms-python.python, like ty or something. Not positive.

austin3dickey avatar Nov 13 '25 18:11 austin3dickey

I looked into this a little. It's happening when you install an extension that depends on this extension, or one (like pyrefly) that depends on ms-python.python which depends on this extension.

Simply adding this to the block list doesn't fully solve the problem, because the block list isn't checked when recursive dependencies are gathered. That'll have to happen as well. I have some local code to clean up and test.

But luckily this problem does not happen for bootstrapped extensions, whose dependencies aren't automatically installed if they're not also bootstrapped. So the bootstrapped pyrefly is actually fine and we can probably tackle this next month.

austin3dickey avatar Nov 20 '25 03:11 austin3dickey

But luckily this problem does not happen for bootstrapped extensions, whose dependencies aren't automatically installed if they're not also bootstrapped.

ah I was wrong about this. So it's probably a good idea to do this for 2025.12.0 too.

austin3dickey avatar Nov 21 '25 04:11 austin3dickey

Verified Fixed

Positron Version(s) : 2025.12.0 build 128
OS Version          : macOS Tahoe 26.1

Test scenario(s)

@austin3dickey A few notes to confirm it's all expected:

  • 'Initializing virtual environments...' has stopped appearing.
  • If I install the Python Environments extension, it no longer shows that either.
  • Installing pyrefly does not lead to automatic installation of extension.
  • Installing PDF Viewer extension by Mathematic Inc. did trigger installation of Python Environments, but as a disabled extension.

I'm closing it as fixed, because in general it prevents the user to get into the bad state. EDIT: When extension was installed, issue appeared. Uninstalling the extension and restarting extensions resolved the issue.

For future issue triages for related issues: check that user has uninstalled the Python Environment extension to see if it fixes any related issues.

rodrigosf672 avatar Nov 25 '25 14:11 rodrigosf672

Check again in the next build. Even after PDF Viewer is installed, Python Environments extension should not be installed.

rodrigosf672 avatar Nov 25 '25 15:11 rodrigosf672

Could you pls tell me if there is a list of preinstalled extensions? It seems that the Python Environments extension and Python Debugger extensions are installed with a fresh install unexpectedly. I wanna uninstall these unexpected packages manually, thank you!

TomXPRIME avatar Nov 26 '25 06:11 TomXPRIME

@TomXPRIME We have a non-comprehensive list here, to give examples of the kinds of things we bundle:

https://positron.posit.co/extensions.html#bootstrapped-extensions

If you are looking to uninstall, do be aware of this known bug: https://github.com/posit-dev/positron/issues/8308

juliasilge avatar Nov 26 '25 18:11 juliasilge

Now it's actually in, apologies for the confusion! Thanks @austin3dickey for the heads-up! All working as expected now, and scenarios listed below.

Verified Fixed

Positron Version(s) : 2025.12.0 build 152
OS Version          : macOS Tahoe 26.1

Test scenario(s)

  • 'Initializing virtual environments...' has stopped appearing ✅

  • If I attempt to install the Python Environments extension, it does not allow me to do so. ✅ Image

  • Installing pyrefly/PDF viewer does not lead to automatic installation of extension. ✅

  • User cannot enable/disable extension, as it cannot be installed. ✅

Image

rodrigosf672 avatar Nov 26 '25 21:11 rodrigosf672