amazon-web-services - 运行 AWS 命令​​时出现无效语法错误

标签 amazon-web-services aws-cli

例如,我在尝试在我的 macbook 上运行任何 aws 命令时遇到异常

命令

aws s3api create-bucket --bucket my_backup  --region us-west-2 --create- 
bucket-configuration LocationConstraint=us-west-1

异常(exception)
Traceback (most recent call last):
File "/Users/avinash/.local/share/virtualenvs/pipend_shell_3- 
x8skfE25/bin/aws", line 7, in <module>
from aws.main import main
File "/Users/avinash/.local/share/virtualenvs/pipend_shell_3- 
x8skfE25/lib/python3.6/site-packages/aws/main.py", line 23
print '%(name)s: %(endpoint)s' % {
                             ^
SyntaxError: invalid syntax

我正在使用 python 3.6.5 并安装了 aws
pip install aws

最佳答案

我想通了这个问题,我做到了 pip 安装 aws 而不是 pip install awscli

我们需要使用下面的命令来安装 aws cli

pip install awscli

关于amazon-web-services - 运行 AWS 命令​​时出现无效语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51259814/

相关文章:

amazon-web-services - BYOL - 在 AWS 中使用自己的 Windows Server 许可证

amazon-web-services - IAM 实例配置文件名称无效

node.js - 自定义端口不适用于 AWS EC2 实例上的 Node.js 应用程序

amazon-web-services - aws-cli - 使用 --query 和 --filter 过滤输出

amazon-web-services - Windows EC2 实例不附带 AWS CLI?

amazon-web-services - 运行 AWS 批处理作业时,收到收到的资源初始化错误 : failed to validate logger args: no such host

mysql - 亚马逊RDS MySQL : Allowing the use of Events and Triggers

python - 通过文本单词列表或 csv 批量检查我的 s3 存储桶权限

amazon-web-services - 在AWS-CLI上进行身份验证时出现UnrecognizedClientException错误

python - 从本地 python 脚本运行 AWS cli 命令?