Search code examples
chocolateyhttpie

Install HTTPie on Windows


I installed HTTPie on Windows using Chocolatey. However, doing it this way installs Python to a default location (C:\python312) that I don't want it to use.

Is there a way to have Python install to another location when installing HTTPie via Chocolatey?


Solution

  • Looking at the Python package that Httpie depends on, it has an /InstallDir parameter (or, the non-metapackage does).

    To use this, you would run something like choco install python312 --params "/InstallDir:C:\your\install\path".

    On running choco install httpie, Chocolatey should then resolve the dependency as already installed, and install Httpie.

    In theory the Python package should also recognise existing installations of Python (of that version) and use that location, so simply preinstalling Python would also work.