Has anyone else encountered this error on cloud9 when trying to install the AWS cli. I followed the instructions here as follows:
sudo yum -y update # (1) Install the latest system updates.
sudo yum -y install aws-cli # (2) Install the AWS CLI.
aws --version # (3) Confirm the AWS CLI was installed.
When I run (2) a message appears saying the install is complete. But when I run (3) the following error message appears:
$ aws --version
Traceback (most recent call last):
File "/usr/bin/aws", line 19, in <module>
import awscli.clidriver
File "/usr/lib/python2.7/dist-packages/awscli/clidriver.py", line 36, in <module>
from awscli.help import ProviderHelpCommand
File "/usr/lib/python2.7/dist-packages/awscli/help.py", line 20, in <module>
from docutils.core import publish_string
File "/home/ec2-user/environment/python_packages/docutils/core.py", line 246
print('\n::: Runtime settings:', file=self._stderr)
^
SyntaxError: invalid syntax
Has anyone else encountered this error? Managed to solve it?
You have most likely installed the wrong/outdated version of awscli.
It is recommended to install awscli via pip.
pip3 install awscli --upgrade --user