Skip to content

Python Launcher registration #27

Open

Description

@verglor

Hi, please would it be possible to register installed versions of Python so that they are recognized by Python Launcher (py.exe).

Basically adding installation path to windows registry at HKEY_CURRENT_USER\Software\Python\PythonCore\<MAJOR.MINOR>\InstallPath should do it.

Activity

  1. linghengqian commented on Nov 13, 2026

    @linghengqian
    Member

    Thanks for raising this — the underlying need is real. py.exe does not search PATH; it discovers interpreters through PEP 514 registrations, so a Python installed by vfox is invisible to py, to .py file associations, and to anything that invokes py -3.x.

    I don't think writing HKCU\Software\Python\PythonCore\<major.minor>\InstallPath is the right fix, though. PythonCore is the identity reserved for python.org's CPython. PEP 514 defines a separate <Company>\<Tag> namespace specifically so third-party distributions can register without overwriting an existing installation. A per-user PythonCore\3.12 key would take precedence over a machine-wide official 3.12, so the user's original Python would effectively disappear from py. It also gives us one slot per minor version, while vfox can have 3.12.8 and 3.12.10 installed side by side (not to mention 32/64-bit and free-threaded builds); the last install would win, and uninstalling one could leave a dangling path or remove another installation's registration. And py -3.12 is documented to select PythonCore only; third-party runtimes are selected with py -V:Company/Tag.

    What I'd be comfortable implementing is an opt-in PEP 514 registration under our own company key, for example:

    HKCU\Software\Python\VersionFox\3.12.10
        DisplayName = "Python 3.12.10 (vfox)"
        SysVersion = "3.12.10"
        SysArchitecture = "64bit"
        InstallPath
            (Default) = "C:\...\python\3.12.10"
            ExecutablePath = "C:\...\python\3.12.10\python.exe"
            WindowedExecutablePath = "C:\...\python\3.12.10\pythonw.exe"
    

    Then py --list would show the vfox installations, and they could be launched with py -V:VersionFox/3.12 or the exact tag, e.g. py -V:VersionFox/3.12.10. It would not shadow an official PythonCore installation, and multiple patch versions could coexist. We'd register on install, remove only entries that still point at the version being uninstalled, and keep the feature opt-in/disableable because it writes machine-level state outside vfox's own environment. This is also the direction Python itself is moving: the new Python install manager reads unmanaged PEP 514 registrations by default, while the legacy py.exe launcher is now deprecated.

    Before going further, could you clarify the actual caller? If the goal is simply for py to see vfox's Pythons, the VersionFox registration above should cover it. If a tool hard-codes py -3.12 and cannot be changed, that's a different request: it means letting vfox take over the PythonCore identity for 3.12, and I'd only consider that as an explicit opt-in that backs up and restores any existing registration — not as the default.

    If the former works for you, I'll keep this open as the opt-in PEP 514 registration request.

  2. linghengqian commented on Nov 13, 2026

    @linghengqian
    Member

    Also see #50 and #51 .

  3. linghengqian commented on Nov 13, 2026

    @linghengqian
    Member

    The current behavior of the plugin is documented at https://github.com/version-fox/vfox-python/blob/main/docs/windows-launcher.md . If there is no response, I will close this issue in one month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions