Skip to content

Windows py launcher: older 32-bit versions not supported in some cases #101135

Closed
@boimart1

Description

@boimart1

Bug report

On 64-bit Windows, if both Python 2.7 32-bit and Python 2.7 64-bit are installed, these two installs are considered equivalent and only the 64-bit version is considered, both when running py -2-32 (which fails) and py -0 (which only displays the 64-bit version).

This is also the case for Python 3.4 and lower, as the "-32" suffix is only part of the tag in the registry in 3.5+.

Under C:\:
image

py -0p output:
image

While these versions are no longer officially supported since 2020, PEP-514 does have a section on backwards compatibility, mentioning:

To ensure backwards compatibility, applications should treat environments listed under the following two registry keys as distinct, even when the Tag matches:

HKEY_LOCAL_MACHINE\Software\Python\PythonCore\<Tag>
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\<Tag>

Your environment

  • CPython versions tested on: 3.11.1
  • Operating system and architecture: Windows 10 x64

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions