Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I am trying to install awscli using pip3 on Linux Mint 17.2 Rafaela.

I am getting the error:

Traceback (most recent call last):

  File "/home/jonathan/.local/bin/aws", line 19, in <module>

    import awscli.clidriver

ImportError: No module named 'awscli'

These are the steps I am taking, following the aws installation guide:

sudo pip install awscli --upgrade --user

everything seems to install fine.

adding to my .bashrc

export PATH=~/.local/bin:$PATH

then

source ~/.bashrc

then i try the command

aws --version

and i get

Traceback (most recent call last):

  File "/home/jonathan/.local/bin/aws", line 19, in <module>

    import awscli.clidriver

ImportError: No module named 'awscli'

Can anyone help with this?

1 Answer

0 votes
by (18.2k points)

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.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

+5 votes
2 answers
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...