简体   繁体   中英

install aws cli on cloud9

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
pip install awscli -upgrade –user

# Then set you path to point to the new version 

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

# awscli may need updated openSSL 

pip install pyOpenSSL --upgrade

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM