其他人在尝试安装AWS cli时在cloud9上遇到此错误。我按照here的说明进行操作,如下所示:
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.
当我运行(2)时,会出现一条消息,说明安装已完成。但是当我运行(3)时,会出现以下错误消息:
$ 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
还有其他人遇到此错误吗?设法解决了吗?