如何卸载aws-cli [英] How to uninstall aws-cli

查看:542
本文介绍了如何卸载aws-cli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置"Amazon Elastic Container Registry",但使用此命令时出现以下错误:aws ecr get-login --no-include-email --region us-west-2:

I am trying to set up an "Amazon Elastic Container Registry" but I get the following error when using this command: aws ecr get-login --no-include-email --region us-west-2:

Unknown options: --no-include-email

手册会在发生这种情况时将我重定向至下一页,以更新我的aws cli. https://docs.aws.amazon.com/cli/latest/userguide/installing.html

The manual redirects me when this occurs to go to the following page, in order to update my aws cli. https://docs.aws.amazon.com/cli/latest/userguide/installing.html

简而言之,请致电pip install awscli --upgrade --user.虽然可以,但我的CLI尚未更新.因此,我完全将其删除了.但是,即使在终端中打开新会话时,我仍然可以使用aws命令...

Which in short means, call pip install awscli --upgrade --user. While that works, my cli is not updated. So I removed it at all pip uninstall awscli. But I still had the aws command available, also when I opened a new session in the terminal...

所以我想我还没有通过pip安装aws cli,但是我不知道它是如何安装的.任何人都可以帮助我,并给我一些指导以解决此问题.因此,我可以删除当前的awscli,然后通过pip install awscli --upgrade --user

So I assume I haven't installed my aws cli via pip, but I can not figure out how it does is installed. Can anyone help me out and give me some directions to resolve this issue. So I can remove the current awscli, and install a new version via pip install awscli --upgrade --user

推荐答案

我遇到了类似的问题.如果其他人也这样做,请回答.我想我最初是没有像这样安装pip的: https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html . 因此,您只需要像这样卸载它(如上面的链接中所述):

I had a similar issue. Answering in case someone else does too. I think I had originally installed it without pip like this: https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html. So you just need to uninstall it like this (as instructed in above link):

$ sudo rm -rf /usr/local/aws
$ sudo rm /usr/local/bin/aws

然后您可以使用pip3重新安装它: https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html

Then you can re-install it with pip3: https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html

基本上:

pip3 install awscli --upgrade --user

然后将其添加到您的路径

Then add it to your path

export PATH=/Users/yourname/Library/Python/3.6/bin/:$PATH

这篇关于如何卸载aws-cli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆