-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Winget upgrade lists and installs Python 3 twice (and any time I start the upgrade) #1392
Comments
This looks like the same behavior reported in #1212. The upgrade command is checking the list of installed packages and seeing more than one installed. It attempts to upgrade both packages, but they may be installed side-by-side so the new version is installed twice. |
@ChristianBeier this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
@ChristianBeier this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
I see the exact same issue with the twist that I can neither uninstall the stale 3.9.5150.0 version of Python nor upgrade it. Brief description of your issueUpgrading from winget list --name Python
Steps to reproduceTry any or all of these:
Expected behaviorAble to uninstall the Python 3.9 using winget command 4, or 5 in the steps to reproduce section. Actual behaviorCannot upgrade or uninstall the stunted version of Python using any of the Environment
pyenv 2.64.11
|
@mavaddat can you confirm if the latest version of python is being installed? This looks like the scenario for packages that support "side by side" installation, and the earlier version isn't removed. The Windows Package Manager is checking to see what is installed, and it finds a match to Python.Python.3 in this case. It attempts to "upgrade" to the latest version of the package, but the upgrade isn't removing the previous version, or upgrading it in place. When you run We've got an issue on the backlog to see if we can detect that the latest version of a package is already installed on a machine so we will skip this package for |
@denelon Yes, I am installing the latest Python 3 stable, which is
Right. I also confirm that I have two system installs of Python 31, which are That is, I used Currently, I am unable to use
It’s worse than that, because I cannot even remove the Pythons that
That makes sense. An additional question is, “why doesn’t [1]: I also have |
@mavaddat, MSIX and MSI installers will typically "upgrade" the existing package. That doesn't hold true for .exe packages. Sometimes they upgrade, and sometimes they install side by side. I've even seen examples where this behavior changes, and doesn't align with semantic versioning. We don't have solid deterministic logic to figure out what they are going to do in advance. Some users want the "upgrade" scenario to remove and install the latest, while other want the side-by-side install. We've been collecting feedback, and looking at how users expect the product to behave. We need to have rational default behaviors, and then support customized behaviors for "power users". We also don't want a bunch of messy conditional logic based on the package, as that would become unmaintainable over time. We are building up additional logic and behavior in or validation infrastructure. The goal is to be able to observe what happens in the upgrade case, and ensure the manifest correctly identifies the behavior so the user can be informed and make choices. |
Would a package maintainer (person, organization, or entity who first publishes a package to Here are my suggestions:
|
Sorry for the late reply. It slipped through the last months. |
When we think about a "package" in Windows, it's generally not just a set of files to be placed on the system. The state of the art has been evolving over many years. Publishers or Independent Software Vendors (ISVs) generally build an installer to handle various aspects of registering the software with Apps & Features, writing registry entries, and file placement. With the MSIX package format, things become a bit easier to manage on the uninstall and upgrade behaviors, but that also comes with interesting caveats related to how they are installed and virtual registry entries are recorded per user. The Windows Package Manager is attempting to meet developers and ISVs where they are. We don't want to require anyone to rewrite their packages or installers. Some of our design goals are listed below.
We are adding additional enhancements to our automated validation system. We do want to verify what happens with uninstall and upgrade scenarios to ensure the manifest has the best or "expected" behaviors defined. Unfortunately, there are many edge cases with legacy installers. We've been discussing ways to somehow rate or identify different issues with packages, so settings could be applied to inform users about findings during validation, and possibly settings to filter out packages with certain limitations or undesired behaviors for certain scenarios. |
I think the problem here is that 'minor' Python 3 versions (3.8, 3.9 etc.) should be treated as different packages (that they are by design), the same way Python 2 is a separate package and does not upgrade into Python 3. For example, if I have Python 3.8.7 installed, I probably want to upgrade it to 3.8.13, rather than 3.10.x Similar (dev related) software by Microsoft already follow that logic, for example dotnet runtimes or VC redist, they don't try to just install the latest but rather upgrade each minor version to its latest patch. |
The problem here is that package with |
@ChristianBeier We released WinGet 1.4 and it's been a while since this issue was reported. Since then, we've added substantial improvements to matching installed packages and versions. Python has also been split into minor versions: We've also added some logic to detect when multiple packages are installed side-by-side and the latest is installed, we don't attempt to download and install the latest version for each earlier version. Can you confirm if this Issue is still actively causing trouble? @NJT145 the meta-package idea along with a couple of others is being tracked at: |
I'm not sure what's happening, but this issue is still here. $ winget --version
v1.4.10173
$ winget source update && winget upgrade
正在更新所有源...
正在更新源: msstore...
完成
正在更新源: winget...
完成
名称 ID 版本 可用 源
-------------------------------------------------------------------------------------------
Python 3.10.8 (32-bit) Python.Python.3.11 < 3.11.0 3.11.1 winget
Python 3.10.9 (64-bit) Python.Python.3.11 < 3.11.0 3.11.1 winget
Python 3.9.13 (64-bit) Python.Python.3.11 < 3.11.0 3.11.1 winget
3 升级可用。 |
@GalaxySnail, thanks for sharing. I'll keep the issue open. |
[Policy] Area-Matching |
We've been working on the side-by-side scenarios. You could try the latest release and enable the experimental feature on: Please provide feedback at: |
Is this still a problem with WinGet 1.8? |
It has been fixed in winget v1.8.1791. Thanks for your efforts! |
Close with reason: Resolved; |
Brief description of your issue
When I start winget upgrade, it lists python 3 twice and when I do upgrade --all it is downloading and installing python-3.9.6-amd64.exe twice. AFAIK it did this even three weeks ago before my vacation.
Steps to reproduce
Execute "winget upgrade" in PowerShell
Expected behavior
Each package should be listed only once and in order matching possible dependencies. After I finished the upgrade, the package should not be listed any longer.
Actual behavior
Python 3 (and I think .net before) is listed, downloaded, and upgraded several times what wastes bandwidth and compute power.
Environment
Surface Laptop 3, Win 11,
Windows Package Manager v1.0.11694
Windows: Windows.Desktop v10.0.22000.160
Package: Microsoft.DesktopAppInstaller v1.15.11694.0
The text was updated successfully, but these errors were encountered: