oldDave
oldDave

Reputation: 405

Unable to install awscli on Ubuntu 16.04

I get this error consistently regardless of how I try to install the aws cli tool

david@david-desktop:~/.aws$ /usr/bin/aws --version
    Traceback (most recent call last):
    File "/usr/bin/aws", line 19, in <module>
    import awscli.clidriver
    File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 17, in <module>
    import botocore.session
ModuleNotFoundError: No module named 'botocore'
Error in sys.excepthook:

I have tried these methods:

Synaptic install - awscli 1.11.13-1ubuntu1~16.04.0

I had to install pyenv to get python 3.6 installed on Ubuntu 16.04. I have used pyenv to set the default to 'system' which is 2.7.12 of python. I have used pyenv to try both python 3.6.5 and 2.7.12 before running the aws command, both get the same error.

Then is sequence, excluding where I used pip to install botocore and boto3:

pip install awscli
pip install --upgrade awscli
sudo pip install awscli --force-reinstall --upgrade
sudo apt-get remove awscli
pip install --upgrade awscli
sudo apt-get install awscli

Then downloaded it according to these instruction: https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html

unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

Upvotes: 1

Views: 2834

Answers (2)

AkshayKrison
AkshayKrison

Reputation: 73

$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

$ unzip awscliv2.zip

$ sudo ./aws/install

Upvotes: 1

AkshayKrison
AkshayKrison

Reputation: 73

Install botocore using the below commands and the all commands again

$ pip3 install botocore
$ pip3 install boto3

Upvotes: 0

Related Questions