Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python3 and aws-cli version differ

I installed aws-cli following the aws docs

  • https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html
$ curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
$ sudo installer -pkg AWSCLIV2.pkg -target /

When I verify their existence I get different Python versions.

$ python3 --version
Python 3.9.6

$ aws --version
aws-cli/2.2.26 Python/3.8.8 Darwin/20.6.0 exe/x86_64 prompt/off

Is this expected?

like image 377
edmamerto Avatar asked Feb 01 '26 09:02

edmamerto


1 Answers

yeah that's expected. The CLI doesn't use your OS'es python, one is bundled into .pkg file as well as all other dependencies. This simplifies installation, testing and development. you can mess around with your OS's python all you like without breaking the CLI.

the guts of the code for this is here: https://github.com/aws/aws-cli/blob/v2/scripts/make-bundle

like image 113
Nath Avatar answered Feb 04 '26 02:02

Nath