Skip to content

Python 3.12.3 installer fails to install py.exe #118347

Closed

Description

@smalers

Bug report

Bug description:

I use Python with MkDocs and had needed to update my environment on a Windows 10 machine that only had Python 3.7. I installed version 3.12.3 since it is the latest stable at the time. I used all the default settings. Afterwards, I ran py --version and py --list and it does not show the latest installation. I thought I must have missed something so I uninstalled 3.12.3 and reinstalled, being careful that the box to install py.exe is checked. The installer does not ask for admin permissions. I can run 3.12.3 in its shell via the Start menu, but it is not known to py.exe and the C:\Winddows\py.exe executable file has a really old date. I then installed Python 3.9.2 because that is consistent with a Linux environment that I use on another machine. Installing with the default settings, the installer askes for admin permissions and py.exe shows the 3.9-64 version and has a newer date consistent with the installer. It seems to me that the 3.12.3 installer is not handling the py.exe installation correctly. I see some other issues related to the installer but not this specific issue, as far as I can tell.

CPython versions tested on:

3.9, 3.12

Operating systems tested on:

Windows

Linked PRs

Activity

  1. terryjreedy commented on Apr 27, 2024

    @terryjreedy
    Member

    My py.exe is 3.13.104.1013 dated 2.15.2024, when I installed 3.13.0a5. It was not replaced when I installed 3.13.0a6 and 3.12.3 3 weeks ago. I presume because it was not changed.

  2. zooba commented on Apr 28, 2024

    @zooba
    Member

    Clearly it's not detecting the existing install like it is supposed to, because you have a per-machine install which ought to be changing to also do a per-machine install instead of the admin-free default.

    If you can, it would be helpful to see the log files created in %TEMP% when you did the installs. I assume the older versions won't be there anymore, but the latest ones should be.

    @terryjreedy - the launcher is versioned independently from CPython, though the numbers happen to match. But it means that the one installed with 3.13 is "newer" than the one with 3.12 and won't be downgraded. It should have been upgraded for alpha 6 though, so that might be another issue. If you've got your log file still, that would be great to see.

    For both of you, in this case, we only need the main log file (all the other ones have longer names than the main file). If you're unsure, a zip file with all the Python... log files you can find in %TEMP% is fine.

  3. smalers commented on Apr 29, 2024

    @smalers
    Author

    @zooba, Again, I am using Windows 10 on a machine that is kept up to date. I uninstalled 3.12.3 using "Add/Remove Programs" and removed all %TEMP% log files for that version, just to make sure that I have a clean set of files. I reran the installer and picked "Install Now" ("Use admin privileges when installing py.exe" is selected but "Add python.exe to PATH" is not). Again, it did NOT prompt for admin login and I got "Setup was successful". In a Windows command shell, I get the following (it lists 3.12 now but I don't think it did when going from 3.7 to 3.12, but I also have 3.9.2 installed now).

    C:\Users\sam\AppData\Local\Temp>py --list
    Installed Pythons found by py Launcher for Windows
     -3.9-64 *
     -3.7-32
     -3.6-64
     -3.12-64
    
    
    C:\Users\sam\AppData\Local\Temp>py --version
    Python 3.9.2
    

    Attached is the main log file as requested.

    Python 3.12.3 (64-bit)_20240428193401.log

  4. zooba commented on Apr 29, 2024

    @zooba
    Member

    Okay, it looks like when we fixed installs breaking due to mixed launcher installs I changed the meanings of some variables without updating all the other users of them. Should be a straightforward fix.

  5. added a commit that references this issue on Apr 29, 2024
  6. zooba commented on Apr 29, 2024

    @zooba
    Member

    In the meantime, if you want the launcher that comes with 3.12.3, you can get it from https://www.python.org/ftp/python/3.12.3/win32/launcher.msi and double-click to install it directly (or run msiexec /i launcher.msi ALLUSERS=1 for an all-users install, which you @smalers will need to do for your scenario).

  7. added a commit that references this issue on Apr 29, 2024
  8. added a commit that references this issue on Apr 29, 2024
  9. zooba commented on Apr 29, 2024

    @zooba
    Member

    Fix is in and backporting to 3.12.

  10. added a commit that references this issue on Apr 29, 2024
  11. added 2 commits that reference this issue on May 8, 2024
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

    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