Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12.3 installer fails to install py.exe #118347

Closed
smalers opened this issue Apr 27, 2024 · 6 comments
Closed

Python 3.12.3 installer fails to install py.exe #118347

smalers opened this issue Apr 27, 2024 · 6 comments
Labels
OS-windows type-bug An unexpected behavior, bug, or error

Comments

@smalers
Copy link

smalers commented Apr 27, 2024

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

@smalers smalers added the type-bug An unexpected behavior, bug, or error label Apr 27, 2024
@terryjreedy
Copy link
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.

@zooba
Copy link
Member

zooba commented Apr 28, 2024

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.

@smalers
Copy link
Author

smalers commented Apr 29, 2024

@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

@zooba
Copy link
Member

zooba commented Apr 29, 2024

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.

@zooba
Copy link
Member

zooba commented Apr 29, 2024

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).

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 29, 2024
…H-118386)

(cherry picked from commit 96d8ca7)

Co-authored-by: Steve Dower <steve.dower@python.org>
@zooba
Copy link
Member

zooba commented Apr 29, 2024

Fix is in and backporting to 3.12.

@zooba zooba closed this as completed Apr 29, 2024
zooba added a commit that referenced this issue Apr 29, 2024
(cherry picked from commit 96d8ca7)

Co-authored-by: Steve Dower <steve.dower@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants