aws cli没有输出

ten*_*npn 5 windows amazon-web-services aws-cli

我已经在这台笔记本电脑上使用 aws cli 与 s3 存储桶交互有一段时间了。突然,该工具停止打印任何输出:

C:\>aws

C:\>aws --debug

C:\>aws --help

C:\>where aws
C:\Users\Andrew\AppData\Roaming\Python\Python37\Scripts\aws
C:\Users\Andrew\AppData\Roaming\Python\Python37\Scripts\aws.cmd
Run Code Online (Sandbox Code Playgroud)

这是在管理员命令提示符中,但在管理员 powershell 提示符中是相同的。Windows 版本 10.0.18362 Build 18362 - 我在几周前进行了周年纪念更新,但不确定它是否相关。

我的另一台(Win 10,周年更新)机器上的 aws cli 使用相同的身份验证,工作正常。

我尝试过直接卸载并重新安装 aws cli,但重新安装后我什至无法让它打印任何内容来验证我的身份。

有任何想法吗?我可以向您提供更多信息吗?

sou*_*ake 22

对于任何遇到这个问题的人来说,如果未安装,某些 v2 版本(2.2.7在我的例子中)似乎会默默地失败。less

在这些情况下,设置AWS_PAGER为空字符串应该可以解决问题。

更高版本的 AWS CLI 版本(例如2.2.18)显然更有帮助:

aws sts get-caller-identity

Unable to redirect output to pager. Received the following error when opening pager:
[Errno 2] No such file or directory: 'less'

Learn more about configuring the output pager by running "aws help config-vars".
Run Code Online (Sandbox Code Playgroud)

  • 谢谢,`export AWS_PAGER=""` 成功了! (7认同)

Mor*_*les 5

我也面临同样的问题。它就像:

$aws sts get-caller-identity

Unable to redirect output to pager. Received the following error when opening pager:
[Errno 2] No such file or directory: 'less'

Learn more about configuring the output pager by running "aws help config-vars".
Run Code Online (Sandbox Code Playgroud)

解是yum install lessapt-get install less。之后,它将显示正确的状态,例如:

$aws sts get-caller-identity

Unable to redirect output to pager. Received the following error when opening pager:
[Errno 2] No such file or directory: 'less'

Learn more about configuring the output pager by running "aws help config-vars".
Run Code Online (Sandbox Code Playgroud)


Fil*_*lov 1

我遇到了同样的问题,对我来说,解决方案是安装 aws cli 的版本 2。

从快速阅读来看,这可能是由版本依赖性不匹配引起Pythonaws