microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.3k stars 4.23k forks source link

[Package Issue]: Python 3 mistaken with Python 2 #160113

Closed DelofJ closed 7 hours ago

DelofJ commented 3 days ago

Please confirm these before moving forward

Category of the issue

Other

Brief description of your issue

Wrong Python version detected

Steps to reproduce

  1. Install Python 3.x
  2. Check what happen when typing winget list python

Btw, before this issue started, I tried to install Python 2, after that my installations of Python 3.11 and 3.12 started being recognized as Python 2 Even after uninstalling everything ( Python 2, Python 3.11, Python 3.12 ) and reinstalling for example Python 3.11, it still gets recognized as Python 2

Actual behavior

The Python versions are mismatched

Expected behavior

I expect it to list the correct python versions

Environment

Gestionnaire de package Windows v1.7.11261
Copyright (c) Microsoft Corporation. Tous droits réservés.

Windows: Windows.Desktop v10.0.19045.4529
Architecture du système : X64
Package : Microsoft.DesktopAppInstaller v1.22.11261.0

Screenshots and Logs

Capture d’écran (393)

SpecterShell commented 3 days ago

Could you run winget list python --verbose-logs --open-logs and share the log?

Dragon1573 commented 3 days ago

Unable to reproduce the issue. Could you please provide commands you previously executed?

17:15:23 D:\...\winget-pkgs  [master ≡] 8.562s pwsh> .\Tools\SandboxTest.ps1
--> Checking dependencies
--> Starting Windows Sandbox, and:
    - Mounting the following directories:
      - C:\Users\Administrator\AppData\Local\Temp\SandboxTest as read-only
      - D:\Workloads\winget-pkgs as read-and-write
    - Installing WinGet
    - Configuring Winget
--> Installing WinGet
--> Disabling safety warning when running installer
Tip: you can type 'Update-EnvironmentVariables' to update your environment variables, such as after installing a new software.

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget install -e Python.Python.2
The `msstore` source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").

Do you agree to all the source agreements terms?
[Y] Yes  [N] No: Y
Found Python 2 [Python.Python.2] Version 2.7.18150
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/2.7.18/python-2.7.18.amd64.msi
  ██████████████████████████████  19.6 MB / 19.6 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget list python
Name                   Id              Version   Source
--------------------------------------------------------
Python 2.7.18 (64-bit) Python.Python.2 2.7.18150 winget
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget uninstall --purge -e Python.Python.2
Found Python 2 [Python.Python.2]
Starting package uninstall...
Successfully uninstalled
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget install -e Python.Python.3.12
Found Python 3.12 [Python.Python.3.12] Version 3.12.4
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.4/python-3.12.4-amd64.exe
  ██████████████████████████████  25.5 MB / 25.5 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget list python
Name                   Id                 Version  Source
----------------------------------------------------------
Python Launcher        Python.Launcher    > 3.12.0 winget
Python 3.12.4 (64-bit) Python.Python.3.12 3.12.4   winget
mdanish-kh commented 3 days ago

[Policy] Needs-Author-Feedback

DelofJ commented 20 hours ago

Well, I don't know how to explain it, but it just got fixed by itself I have no idea why this happened, maybe rebooting my computer fixed it To be honest, it's not the first time that winget starts to bug out and after a reboot, everything works fine again Well, sorry for the inconvenience

mdanish-kh commented 7 hours ago

Glad it's working again!

Close with reason: Issue resolved;