Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

choco install httpie : ERROR: The term 'py' is not recognized as the name of a cmdlet,

Đang mở
#1,617 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
powershell, python
Lĩnh vực
cli, devops

Hướng nghiên cứu

Bắt đầu với C:\ProgramData\chocolatey\lib\httpie\tools\chocolateyinstall.ps1 và tái hiện lỗi bằng cách sử dụng choco install httpie trên Windows với Python 3.12. Xác minh rằng trình cài đặt hoàn tất trên một hệ thống không có lệnh py, đồng thời vẫn giữ nguyên việc cài đặt HTTPie.

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

Mô tả

bug new

Checklist

  • I've searched for similar issues.
  • I'm using the latest version of HTTPie.

Minimal reproduction code and steps

env:
windows pc
pyhon 3.12

1.choco install httpie
2.y
3.error

Current result

this is log:
PS C:\Windows\System32> choco install httpie
Chocolatey v0.10.15
2 validations performed. 1 success(es), 1 warning(s), and 0 error(s).

Validation Warnings:

  • A pending system reboot request has been detected, however, this is
    being ignored due to the current Chocolatey configuration. If you
    want to halt when this occurs, then either set the global feature
    using:
    choco feature enable -name=exitOnRebootDetected
    or pass the option --exit-when-reboot-detected.

Chocolatey detected you are not running from an elevated command shell
(cmd/powershell).

You may experience errors - many functions/packages
require admin rights. Only advanced users should run choco w/out an
elevated shell. When you open the command shell, you should ensure
that you do so with "Run as Administrator" selected. If you are
attempting to use Chocolatey in a non-administrator setting, you
must select a different location other than the default install
location. See
https://chocolatey.org/install#non-administrative-install for details.

Do you want to continue?([Y]es/[N]o): y

Installing the following packages:
httpie
By installing you accept licenses for the packages.
Progress: Downloading httpie 3.2.2... 100%

httpie v3.2.2 [Approved] - Possibly broken
httpie package files install completed. Performing other installation steps.
The package httpie wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): y

ERROR: The term 'py' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
The install of httpie was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\httpie\tools\chocolateyinstall.ps1'.
See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • httpie (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\httpie\tools\chocolateyinstall.ps1'.
    See log for details.

…

As you can see from the log, the problem is caused by the installation script. The installation script calls the py command, which is optional in windows and does not necessarily exist after installing python. We should call python instead of py

Expected result

can choco install httpie success

…


Debug output

Please re-run the command with --debug, then copy the entire command & output and paste both below:

$ http --debug <COMPLETE ARGUMENT LIST THAT TRIGGERS THE ERROR>
<COMPLETE OUTPUT>

Additional information, screenshots, or code examples

…

Ngôn ngữ chính
Python
Star
38.6k
Fork
4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Mở hướng dẫn đóng góp

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.

Issue khác của httpie/cli

Tất cả issue của httpie/cli

Issue tương tự

Thêm issue về Python

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.