python / python/pymanager

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

Đang mở Phù hợp với người mới
#370 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

documentation
Ngôn ngữ chính
Python
Star
344
Fork
74
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
7

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với phần khắc phục sự cố Windows được liên kết trong tài liệu Python và xem lại các bước khắc phục sự cố hiện có. Thêm việc cài đặt lại Python Install Manager như một cách khắc phục khả thi cho các bí danh python.exe bị hỏng, dựa trên hành vi Windows Store đã được báo cáo. Công việc được xem là hoàn tất khi hướng dẫn mới rõ ràng và phù hợp với các chỉ dẫn khắc phục sự cố xung quanh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
75/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.