python / python/pymanager

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

Aperta Adatta ai principianti
#370 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

documentation
Lingua principale
Python
Stelle
344
Fork
74
Merge medio
1g 3h
PR unite (30g)
7

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla sezione collegata relativa alla risoluzione dei problemi di Windows nella documentazione di Python e rivedi i passaggi esistenti per la risoluzione dei problemi. Aggiungi la reinstallazione di Python Install Manager come possibile soluzione per gli alias python.exe non funzionanti, sulla base del comportamento segnalato di Windows Store. Il lavoro è completato quando le nuove indicazioni sono chiare e si integrano con le istruzioni di risoluzione dei problemi circostanti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
1/5
Tempo stimato
1-3 ore
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
75/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.