pythonwindowsinstallationpipaws-cli

Installing AWS CLI v2 through PIP on Windows


Is it possible to install AWS CLI v2 through PIP on Windows?

In the instructions the recommended way to install is via MSI, but I want to use PIP.

What if I install CLI like given on Github in a Linux way:

python -m pip install awscli

Will it install v1 or v2 by default?


Solution

  • For people would like to use pipx to isolate between environments, the url mentioned by @FlyingTeller git+https://github.com/aws/aws-cli/tree/v2 does not work with pipx, instead you can try this:

    pipx install git+https://github.com/aws/aws-cli.git@v2
    

    After that you can see:

    $ aws --version
    aws-cli/2.4.17 Python/3.9.9 Linux/5.4.0-99-generic source/x86_64.ubuntu.20 prompt/off