-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Package Issue]: winget suggests upgrading Python.Launcher to 3.12 when Python 3.11 is installed #122168
Comments
Looking at the discussion in #121195 and this issue, I'm still unsure if this package is to be treated as its own separate package or something that should be installed only when its matching standalone Python version is present? Does the version of Python launcher has to match the version of standalone python? If that's the case then we should break the PackageId into I suggested that this package should have its own PackageId that isn't divided into its minor version since I assumed it to be a standalone package (and also one that does not install side-by-side). But looking at the error message it seems one cannot upgrade to Python Launcher 3.12 if corresponding 3.12 installation of Python isn't present correct? cc @zooba from the original package request |
@tsunamistate For Winget version v1.6, you can just "pin" that package as a walkaround. Winget will ignore that package when you invoke If it really needs exactly version matching, I can create pull requests for fixing this. |
This won’t work, because of some issues with how winget performs correlation. This is being tracked at winget-cli with the |
The launcher does not need exact version matching with anything, it stands alone. It's not an optional feature of the CPython installer, it's more of an optional bundled product. You can see this by uninstalling Python 3.11 - the launcher remains behind and has to be uninstalled separately (or alternatively, you can install multiple different versions of CPython and notice that there's only one launcher installed). I don't understand why that dialog pops up. It looks like a broken MSI file association and using the shell to launch the MSI, but I'd have expected WinGet to use at least In any case, this is likely to be a source of complaints, and I'm sure we'll all get sick of explaining that the launcher is actually separate from Python. If there's a way to mark its manifest as "do not auto-upgrade", that will cut down on complaints. |
So finally got to test the installer and here's what I could find: The issue is actually related to microsoft/winget-cli#3011. The problem is that although this (and almost every other) WiX installer installs to winget-pkgs/manifests/p/Python/Launcher/3.12.0/Python.Launcher.installer.yaml Lines 32 to 38 in f6b03e9
which would try to pass The temporary workaround here is to not support explicit scopes in the manifest and let the installer execute with default args. This should work fine for majority of the users. For anyone that would want a true machine-based installation would have to use the |
This makes no sense, but it does seem to be what's happening. Windows Installer must be doing it though, because the installer itself doesn't have permission to modify HKLM (e.g. passing Has anyone checked with the Windows Installer team whether this is intentional? It seems like it would mess up if multiple users installed the same per-user product, which is supposed to be supported with user scoped installers. |
There is some discussion around the topic in microsoft/winget-cli#3011 and a response from the WiX installer team in the issue. |
WiX is not Windows Installer. The MSI file itself doesn't specify where uninstall/registration information should be stored, and generating that file is all WiX is concerned with. Windows Installer is the team at Microsoft who actually install the files based on the MSI. |
cc @denelon |
I'm looking into it. |
Now that #122472 is merged, @tsunamistate Can you check if you're still facing this issue? |
The error when attempting to upgrade is fixed, but upgrading doesn't make the prompt to go away |
@tsunamistate That was explained in #122168 (comment). As far as I understand, Python Launcher is a standalone package different from regular installation of Python. The launcher can be upgraded irrespective of what the current installation of Python is. winget will offer that upgrade to you, but if you decide that you want to stick to 3.11 version you can set a gating pin and lock Python.Launcher to 3.11.x versions. You can do this with this command
There is a way to exclude the package from |
I know about the pinning, but this is a workaround, and not a fix |
Maybe the better state would be "only upgrade if it was installed by winget", which would actually have solved a number of other issues I've faced due to winget on my own machine (I don't use it, but some automated tools do, and they've broken things I installed manually). However, if the upgrade had silently worked, this issue wouldn't exist. Making sure that upgrade detection gets the scope right would be best. |
same issue also happens to Go installer. Latest is |
The installation succeeds running > winget upgrade -h --all
Name Id Version Available Source
---------------------------------------------------------
Python Launcher Python.Launcher < 3.12.0 3.12.0 winget
2 upgrades available.
The following packages have an upgrade available, but require explicit targeting for upgrade:
Name Id Version Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9012 1.0.9018 winget
2 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
Installing dependencies:
(1/1) Found Python Launcher [Python.Launcher] Version 3.12.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://www.python.org/ftp/python/3.12.0/win32/launcher.msi
██████████████████████████████ 540 KB / 540 KB
Successfully verified installer hash
Starting package install...
Successfully installed
> winget --info
Windows Package Manager v1.6.2771
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.2506
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.2771.0 The logs: |
The only fix that worked for me was going to Add or remove programs and uninstalling every instance of Python Launcher that was not 3.12. Not a fix if you need those older launcher versions, but it does remove the Python.Launcher from the
|
@beingmerry How many instances did you have? There's only ever been a single installer for the Python Launcher (with the exception of 1-2 broken releases that should have been removed by later versions of the installer). If you had more than one launcher installed, something else is going wrong for you. |
@zooba I had installed Python from 3.9, then 3.11, then 3.12. I uninstalled the Python launcher from 3.9. not sure why I had multiple versions when you are saying there was ever only one version... |
Note that the Python install is separate from the Python Launcher install. Each Python install also bundles the launcher, and will upgrade it from previous versions to the one that it bundles. Removing the Python install won't affect the launcher it installed. But I guess they're all gone now, so we can't figure out how you ended up with multiple. |
I also had multiple installations (two |
Given you've both commented here, I assume you're winget users. So presumably there's something about how winget installs Python that messed up the registration of the launcher. I looked in a few manifests but nothing jumps out as an obvious issue. But I'm assuming that the installer just gets run directly with the command line options and relies on our Burn bundle to do the registration - if anything more complex is going on, then it's beyond me. |
I had the same issue today where Python Launcher showed Version < 3.12.0, Available 3.12.0 and an upgrade had the line remain. I had run the command: Checking Add / Remove Programs after upgrading everything through winget, I had Python 3.11.6 installed (also confirmed via I'm fine running the latest, so I uninstalled Python 3.11 too and manually installed 3.12, although now it confusingly wants to upgrade to 3.12 as part of |
I have the same issue @ascendedguard . Unistall 11 and install 12, and run winget upgrade and I have the same > 3.11 3.12 |
I had version 3.9.0 and 3.12.0 installed and after removing version 3.9.0 through the installed applications, > 3.12.0 3.12.0 no longer appears in winget. |
Please confirm these before moving forward
Category of the issue
Other
Brief description of your issue
I currently have Python 3.11.6 installed, and don't want to upgrade yet
However, winget suggests upgrading Python.Launcher package to 3.12
Attempting to upgrade gets the following error:
Question: why does Python.Launcher have a separate manifest? AFAIK, Python launcher is an optional feature invoked from Python installer, its version matches the version of Python installed, and it doesn't have a separate update mechanism
Steps to reproduce
winget upgrade
from CMD or PowerShell promptActual behavior
winget suggests upgrading Python.Launcher to 3.12
Expected behavior
winget doesn't suggest upgrading Python.Launcher to 3.12 since Python 3.11 is installed
Environment
Screenshots and Logs
No response
The text was updated successfully, but these errors were encountered: