Skip to content

py uninstall fails "object has no attribute 'enable_entrypoints'" #283

Description

@RoyalXXX

Installed from the Windows Store
Version: 26
Windows 11

Describe the bug

Python Install Manager fails to fully uninstall Python versions. The uninstall process removes the main directory but leaves behind shortcuts, registry entries (the program remains listed in Windows "Uninstall or change a program"), and throws an internal AttributeError at the end of the process.

Actual Behavior:

C:\Windows\System32>py uninstall 3.12
Uninstall Python 3.12.10? [Y/n] y
Removed Python 3.12.10
[ERROR] INTERNAL ERROR: AttributeError: 'UninstallCommand' object has no attribute 'enable_entrypoints'

After the process completes:
C:\Users<username>\AppData\Local\Python — Python files are removed ✅
Desktop/Start Menu shortcuts — still present ❌
Windows "Uninstall or change a program" entry — still present ❌

Expected Behavior:
A complete uninstall should remove all associated files, shortcuts, and registry entries without any internal errors.

Additional Context:
The same incomplete uninstallation occurs when using the standard Windows uninstaller via "Uninstall or change a program" - not just via py uninstall. This suggests the issue is systemic to how the Install Manager registers and cleans up components.


One possible workaround is to run py uninstall --purge. This isn’t really a proper solution (since this command removes all installed Python runtimes), but after running it all leftover traces were removed from the computer (shortcuts and entries in Uninstall or change a program). After that, I had to reinstall the Python runtimes I needed.

Activity

  1. zooba commented on Mar 9, 2026

    @zooba
    Member

    Unfortunately, we can't intercept the OS uninstall command anymore to do a full cleanup. But as you point out, we don't really want to - if you remove the install manager, then you keep your installs.

    The only issue here right now is the uninstall commands for each runtime won't work, since they rely on the install manager being installed (which hopefully is obvious, but it could behave better).

    Using --purge before removing the install manager is the intended way to remove everything.

  2. RoyalXXX commented on Mar 9, 2026

    @RoyalXXX
    Author

    @zooba in that case, it might be more correct if, when installing different runtimes, no entries were created in “Uninstall or change a program” and no shortcuts were made for each installed Python version - since it’s impossible to properly remove them later anyway.
    Now when you run py uninstall, the runtime gets uninstalled, but it leaves junk behind. You can remove the shortcuts by hand, but the entries in “Uninstall or change a program” just stay there forever. That’s clearly not the right behavior.

  3. Jesse205 commented on May 17, 2026

    @Jesse205
    Contributor

    I don't think the internal error should be printed out anyway. If this is indeed the expected behavior, you can print a warning prompting the user to manually clean up the junk.

  4. reopened this on May 18, 2026
  5. zooba commented on May 18, 2026

    @zooba
    Member

    I'm sorry, I totally misread the issue. py uninstall should not be failing like that, so this is a real bug (which is somehow slipping through testing).

    I guess there were a series of people complaining that uninstalling the install manager doesn't get rid of every Python you've ever installed, which is what I confused this report for.

  6. added
    bugSomething isn't working
    release-blockerDo not release without fixing this issue!
    on May 18, 2026
  7. changed the title [-]Incomplete uninstallation via Python Install Manager: leftover shortcuts, registry entries, and internal AttributeError[/-] [+]py uninstall fails "object has no attribute 'enable_entrypoints'"[/+] on May 18, 2026
  8. self-assigned this
    on May 18, 2026
  9. zooba commented on May 18, 2026

    @zooba
    Member

    Ah, it was only triggering failure if you were uninstalling one of multiple runtimes, and our test was uninstalling the last one. With none remaining, it didn't try to update aliases/entrypoints. That's why it snuck through. PR incoming

  10. added a commit that references this issue on May 18, 2026
    a6a7bec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrelease-blockerDo not release without fixing this issue!

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions