Skip to content

Winget upgrade lists and installs Python 3 twice (and any time I start the upgrade) #1392

Closed

Description

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

Activity

  1. ghost added
    Needs-Triage
    on Aug 23, 2021
  2. denelon commented on Aug 23, 2021

    @denelon
    Collaborator

    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.

  3. added
    Needs-Author-Feedback
    Issue-Bug
    and removed
    Needs-Triage
    on Aug 23, 2021
  4. ghost added
    No-Recent-Activity
    on Aug 30, 2021
  5. ghost removed
    No-Recent-Activity
    on Oct 1, 2021
  6. ghost added
    No-Recent-Activity
    on Oct 9, 2021
  7. mavaddat commented on Nov 21, 2021

    @mavaddat

    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 issue

    Upgrading from cmd, PowerShell user or admin using winget upgrade --all or winget upgrade will always declare that there is an update to Python3 because winget has installed two versions of Python while it holds back the older 3.9.*.* version.

    winget list --name Python
    Name Id Version Available Source
    Python Launcher {463B0974-B1E1-401E-8F59-B0F9F81258E4} 3.10.7581.0
    Python 3 Python.Python.3 3.10.150.0 winget
    Python 3 Python.Python.3 3.9.5150.0 3.10.150.0 winget

    Steps to reproduce

    Try any or all of these:

    1. winget upgrade --all
    2. winget upgrade --id Python.Python.3 --version 3.9.5150.0
    3. winget upgrade --id Python.Python.3
    4. winget list --name Python
    5. winget uninstall --id Python.Python.3 --version 3.9.5150.0
    6. winget uninstall --id Python.Python.3

    Expected behavior

    Able to uninstall the Python 3.9 using winget command 4, or 5 in the steps to reproduce section.

    Actual behavior

    Cannot upgrade or uninstall the stunted version of Python using any of the winget commands in the steps to reproduce section.

    showing winget upgrade --all

    showing winget upgrade --all again and uninstall attempt

    Environment

    OS Name Platform ServicePack Version VersionString
    Microsoft Windows 11 Pro Insider Preview Win32NT 10.0.22504.0 Microsoft Windows NT 10.0.22504.0

    pyenv 2.64.11

    $ where.exe python
    C:\Users\mavad\AppData\Local\Programs\Python\Python310\python.exe
    C:\Users\mavad\.pyenv\pyenv-win\shims\python
    C:\Users\mavad\.pyenv\pyenv-win\shims\python.bat
    
  8. ghost removed
    No-Recent-Activity
    on Nov 21, 2021
  9. denelon commented on Nov 22, 2021

    @denelon
    Collaborator

    Mavaddat Javid (@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 winget upgrade again, the same thing is happening over again.

    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 winget upgrade --all.

  10. 22 remaining items

  11. added this to the milestone on Apr 18, 2023
  12. Trenly commented on Jun 16, 2023

    @Trenly
    Contributor

    [Policy] Area-Matching
    [Policy] Side-By-Side

  13. added
    Area-Matching
    Side-by-Side
    on Jun 16, 2023
  14. added
    Command-Upgrade
    on Jul 20, 2023
  15. denelon commented on Apr 2, 2024

    @denelon
    Collaborator

    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:

  16. denelon commented on Jul 3, 2024

    @denelon
    Collaborator

    Is this still a problem with WinGet 1.8?

  17. added
    Needs-Author-Feedback
    on Jul 3, 2024
  18. GalaxySnail commented on Jul 6, 2024

    @GalaxySnail

    It has been fixed in winget v1.8.1791. Thanks for your efforts!

  19. Trenly commented on Jul 6, 2024

    @Trenly
    Contributor

    Close with reason: Resolved;

  20. removed this from the milestone on Jul 6, 2024
  21. removed
    Needs-Author-Feedback
    on Jul 6, 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

    Area-MatchingCommand-UpgradeIssue-BugSide-by-Side

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions