Check if your aws cli was installed correctly and in the right directory.
If you find that aws cli is not installed in the right directory then uninstall your aws cli using the following command:
sudo pip3 uninstall awscli
Make sure that you have also removed all the dependencies of awscli.
After uninstalling, install it again using the following command:
sudo pip3 install awscli
Now if you run the aws --version command, it should work fine.