0 votes
1 view
by (8.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>

    sys.exit(main())

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

    return awscli.clidriver.main()

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

    driver = create_clidriver()

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

    event_hooks=emitter)

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

    modules = _import_plugins(plugin_mapping)

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

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

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

    from awscli.customizations.opsworks import initialize as opsworks_init

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

    from six.moves import shlex_quote

ImportError: cannot import name shlex_quote

1 Answer

0 votes
by (18.5k 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

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


Categories

...