Following these steps to install AWS-CLI in a brand new Ubuntu 18.04:
sudo apt update
sudo apt upgrade
sudo apt install python3-pip
sudo apt install npm
(I will working with NodeJS)pip3 install awscli --upgrade --user
After the step 5 I should be able to see the aws-cli
version. But this is what I get:
aws --version
Command 'aws' not found, but can be installed with:
sudo apt install awscli
(I did nothing)
But If I check in ll ~/.local/bin
This is what I have:
drwxrwxr-x 2 ubuntu ubuntu 4096 Jun 22 15:46 __pycache__/
-rwxrwxr-x 1 ubuntu ubuntu 815 Jun 22 15:46 aws*
-rwxrwxr-x 1 ubuntu ubuntu 1432 Jun 22 15:46 aws.cmd*
-rwxrwxr-x 1 ubuntu ubuntu 204 Jun 22 15:46 aws_bash_completer*
-rwxrwxr-x 1 ubuntu ubuntu 1136 Jun 22 15:46 aws_completer*
-rwxrwxr-x 1 ubuntu ubuntu 1807 Jun 22 15:46 aws_zsh_completer.sh*
If I run
python3 -m awscli --version
this is what I get:aws-cli/1.18.84 Python/3.6.9 Linux/4.15.0-1065-aws botocore/1.17.7
So it seems that aws-cli
is installed and already in ~/.local/bin
but not respond to the aws configure
command.
What am I missing?
UPDATE
This is what have in the $PATH
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
~/.local/bin
is not currently in your$PATH
because it did not exist when you opened your shell.Log out and log back in to fix this problem.
To explain, if you take a look at your
~/.profile
file, you will see the following lines:If you look closely, you will see that
$HOME/.local/bin
will be added to your path if and only if it exists.So, the first time you install something locally with pip, you will need to log out and log back in.
Alternatively, you can also source your
~/.profile
file if you don't want to log out:or