通过PIP3安装时Ubuntu无法找到AWS CLI

发布于 2025-02-02 14:46:17 字数 340 浏览 4 评论 0原文

我正在尝试使用pip3安装AWS CLI,如下所示:

user@machine:~/Personal/aws-tutorial$ pip3 install awscli

安装后,我尝试检查版本

aws --version
-bash: /usr/bin/aws: No such file or directory

,该版本未能提及找不到aws找不到。

有人可以帮我解决这个问题吗?

我目前在Ubuntu 20.04上运行Python 3.8.10。

I am trying to install AWS CLI using pip3 as follows:

user@machine:~/Personal/aws-tutorial$ pip3 install awscli

Once installed, I am trying to check the version

aws --version
-bash: /usr/bin/aws: No such file or directory

Which fails mentioning that aws could not be found.

Could someone please help me resolve this?

I am currently on Ubuntu 20.04 running Python 3.8.10.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷雾森÷林ヴ 2025-02-09 14:46:17

TLDR:检查您的路径,将AWSCLI DIR添加到路径中。

我可能测试了您的步骤

# root user
root@26be9a426bee: aws --version
aws-cli/1.24.10 Python/3.10.4 Linux/5.18.0-arch1-1 botocore/1.26.10
root@26be9a426bee: which aws
/usr/local/bin/aws
# normal user
eliot@laptop: which aws                                                                                                                                                                                        
/home/eliot/.local/bin/aws

,您需要通过echo $ path检查路径env,如果它们不在路径中,则将AWS dir添加到您的路径中。

TLDR: check you PATH env, add awscli dir into PATH.

I tested your step

# root user
root@26be9a426bee: aws --version
aws-cli/1.24.10 Python/3.10.4 Linux/5.18.0-arch1-1 botocore/1.26.10
root@26be9a426bee: which aws
/usr/local/bin/aws
# normal user
eliot@laptop: which aws                                                                                                                                                                                        
/home/eliot/.local/bin/aws

Probably, you need check your PATH env by echo $PATH, and add aws dir into you PATH if they not in PATH.

梦在夏天 2025-02-09 14:46:17

要使用PIP安装AWS-CLI软件包,

$ python3 -m pip install awscli

它对我有用。

To install aws-cli package using pip,

$ python3 -m pip install awscli

It worked for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文