Intellipaat Back

Explore Courses Blog Tutorials Interview Questions

Explore Tech Questions and Answers

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

0 votes
by (12.9k points)

I'm getting the following error when I tried running AWS CLI. I've tried installing six, but it still didn't work.

Can someone advise me what's wrong?

I have never managed to run AWS CLI on this computer before.

Traceback (most recent call last):

  File "/usr/local/bin/aws", line 23, in <module>


  File "/usr/local/bin/aws", line 19, in main

    return awscli.clidriver.main()

  File "/usr/local/lib/python3.3/site-packages/awscli/", line 49, in main

    driver = create_clidriver()

  File "/usr/local/lib/python3.3/site-packages/awscli/", line 58, in create_clidriver


  File "/usr/local/lib/python3.3/site-packages/awscli/", line 44, in load_plugins

    modules = _import_plugins(plugin_mapping)

  File "/usr/local/lib/python3.3/site-packages/awscli/", line 61, in _import_plugins

    module = __import__(path, fromlist=[module])

  File "/usr/local/lib/python3.3/site-packages/awscli/", line 61, in <module>

    from awscli.customizations.opsworks import initialize as opsworks_init

  File "/usr/local/lib/python3.3/site-packages/awscli/customizations/", line 24, in <module>

    from six.moves import shlex_quote

ImportError: cannot import name shlex_quote

1 Answer

0 votes
by (18.2k points)

You can try re-installing AWS CLI using the following command

sudo pip install awscli --ignore-installed six

This command will install the latest version of AWS CLI package along with all its dependencies. This should resolve the error as the version 1.6.7 had some compatibility issues with the minimum version of six package that was needed but these issues have been resolved so upgrading to the latest version should fix the error.

If the error is still not resolved then try downgrading to v1.6.6 using the following command:

sudo pip install awscli==1.6.6

Related questions

0 votes
1 answer
0 votes
1 answer
asked Dec 19, 2020 in AWS by devin (5.6k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories