python.exe and other aliases not working before reinstalling the manager

Offen Anfängerfreundlich
#370 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
75/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
python
Bereich
documentation

Rechercherichtung

Beginne mit dem verlinkten Abschnitt zur Windows-Fehlerbehebung in der Python-Dokumentation und überprüfe die vorhandenen Schritte zur Fehlerbehebung. Füge die Neuinstallation des Python Install Manager als mögliche Lösung für nicht funktionierende python.exe-Aliase hinzu, basierend auf dem gemeldeten Verhalten des Windows Store. Als erledigt gilt die Aufgabe, wenn die neue Anleitung klar ist und zu den umgebenden Anweisungen zur Fehlerbehebung passt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

documentation

Install source and version

  • Installed from the Windows Store
  • Installed with the MSIX from python.org
  • Installed with the MSI from python.org
  • Installed with winget install 9NQ7512CXL7T

Version: 26.2.240.0

Describe the bug
I was trying to start python via the "python" command, instead of the "py" command. But it was not working.
Powershell kept giving me this error:

Program 'python.exe' failed to run: The system cannot find the path specifiedAt line:1 char:1
+ python
+ ~~~~~~.
At line:1 char:1
+ python
+ ~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

The "py" command on the other hand was working like a charm.

I've tried to:

  1. Refresh the python install with py install --refresh
  2. Unchecked and re-checked all python aliases in Windows' "Manage app execution aliases" settings.
  3. Re-configure the python installation with py install --configure
  4. Force re-installing python with py install -f default

Nothing was working. And %UserProfile%\AppData\Local\Microsoft\WindowsApps was correctly in the PATH.
So I've tried to launch the python.exe directly present in the WindowsApps folder: Nope, same issue.

At that point, since it was an issue with the Windows app, I thought I'd try to reinstall the Python Install Manager itself from the Store. And that fixed it!

No idea what was wrong with the .exe link inside the WindowsApps folder. But this error, and this fix (reinstalling the manger itself) are not present in the troubleshooting steps in the online docs. So I'm reporting this in case another user finds itself in this same pickle, and, to perhaps include "reinstall the manger" as an additional troubleshooting step in the online docs?

To Reproduce
No idea.
I'm glad to provide log files. But dunno where to find log files related to the WindowsApps .exe files.

Expected behavior
Implement the fix found, in the troubleshooting steps.

Vorherrschende Sprache
Python
Sterne
344
Forks
74
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
7

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python/pymanager

Alle Issues in python/pymanager

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.