Aws-cli: Broken docutils==0.15

Created on 21 Jul 2019  Â·  12Comments  Â·  Source: aws/aws-cli

Hi community,

Today docutils were updated to 0.15 (https://pypi.org/project/docutils/#history) and it breaks awscli running on Python 2.

# aws --version
Traceback (most recent call last):
  File "/bin/aws", line 19, in <module>
    import awscli.clidriver
  File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 36, in <module>
    from awscli.help import ProviderHelpCommand
  File "/usr/lib/python2.7/site-packages/awscli/help.py", line 20, in <module>
    from docutils.core import publish_string
  File "/usr/lib/python2.7/site-packages/docutils/core.py", line 246
    print('\n::: Runtime settings:', file=self._stderr)
                                         ^
SyntaxError: invalid syntax
bug

Most helpful comment

Yes, workaround using
pip install docutils==0.14
after the installation of the aws cli

All 12 comments

Yes, workaround using
pip install docutils==0.14
after the installation of the aws cli

Yes, workaround using
pip install docutils==0.14
after the installation of the aws cli

yup using the same workaround

good one ;)

all the aws cli looks broken with last version of docutils yep ..

Just a quick update to let everyone know that a fix is in the works to deal with what appears to be docutils releasing Python 3 only syntax to Python 2 users.

Where it is being tracked, FYI.
https://sourceforge.net/p/docutils/bugs/365/

Is it possible for aws-cli to pin dependencies in a way to avoid this?

Seems like this is now fixed for the bootstrapping code for opsworks instances

Thanks for solving this.
So how was the fix distributed? Did 0.15 got re-released with the fix?
As I get conflicting signals on whether 0.15 works or not.

The updated py2 wheel has now been posted; I believe that the team's assessment was that a build order problem caused the py2 wheel to be built as py3.

For souls who don't dabble in python and pip much — given a fresh install of awscli fixes this, you can force an install by calling pip install --ignore-installed awscli

If using Anaconda, just go for
conda install -c conda-forge awscli

I did this and it installed the stable awscli version. Saves your time.

Was this page helpful?
0 / 5 - 0 ratings