Home > database >  Ubuntu unable to find AWS CLI when installed via pip3
Ubuntu unable to find AWS CLI when installed via pip3

Time:05-30

I am trying to install AWS CLI using pip3 as follows:

user@machine:~/Personal/aws-tutorial$ pip3 install awscli

Once installed, I am trying to check the version

aws --version
-bash: /usr/bin/aws: No such file or directory

Which fails mentioning that aws could not be found.

Could someone please help me resolve this?

I am currently on Ubuntu 20.04 running Python 3.8.10.

CodePudding user response:

TLDR: check you PATH env, add awscli dir into PATH.

I tested your step

# root user
root@26be9a426bee: aws --version
aws-cli/1.24.10 Python/3.10.4 Linux/5.18.0-arch1-1 botocore/1.26.10
root@26be9a426bee: which aws
/usr/local/bin/aws
# normal user
eliot@laptop: which aws                                                                                                                                                                                        
/home/eliot/.local/bin/aws

Probably, you need check your PATH env by echo $PATH, and add aws dir into you PATH if they not in PATH.

CodePudding user response:

To install aws-cli package using pip,

$ python3 -m pip install awscli

It worked for me.

  • Related