After installing the awslocal CLI with pip3, I am seeing this in my terminal while checking the CLI options: zsh: command not found: awslocal
Asked Answered
D

4

11

I am trying to install the awslocal CLI tool with pip3.

I have ran the command:

pip3 install awscli-local --user

I am trying to see the what CLI options there are and have run the command

awslocal

I am getting this response

zsh: command not found: awslocal

I am not sure what other steps I am missing

Dannydannye answered 21/10, 2020 at 17:8 Comment(3)
What environment are you attempting to install awslocal in? Linux, windows, WSL, gitbash?Nameplate
@Nameplate with zsh message, this can be only Mac...Misunderstanding
Ah, I'm not familiar with Macs.Nameplate
T
5

Run the command

sudo pip3 install awscli-local

You will be asked for your system password, please provide that.

Now, command will install required things, your next screen will be like :-

Collecting awscli-local
Downloading awscli-local-0.21.tar.gz (11 kB)
Preparing metadata (setup.py) ... done

You can check the status after running successfully, by running below command.

awslocal --version

Thebaine answered 21/8, 2023 at 11:16 Comment(0)
B
3

Run the command:

pip3 install awscli --upgrade --user

and watch closely where the aws cli tool gets installed, you can see the path on terminal log, in my case I got something like this:

awscli in ./Library/Python/3.8/lib/python/site-packages

Now you should add to your .bash_profile the same path but on the bin folder(removing from the lib path and instead put your bin path) like this:

export PATH=/Users/your.user.name/Library/Python/3.8/bin/:$PATH
Butterbur answered 2/6, 2022 at 16:8 Comment(1)
The question is about awslocal that should be provided by localstack : github.com/localstack/localstack#exampleShowthrough
F
1

This fixed it for me

brew install awscli-local
Furgeson answered 16/4 at 0:18 Comment(0)
S
0

Verify Installation Directory:

Since you installed awscli-local in user mode, the binary might be located in a directory like ~/.local/bin. You can check if the awslocal executable is in this directory:

ls ~/.local/bin/awslocal

Update PATH Environment Variable: If awslocal is located in ~/.local/bin, you need to add this directory to your PATH. You can do this by adding the following line to your ~/.zshrc file:

export PATH=$PATH:~/.local/bin

After adding this line, apply the changes:

source ~/.zshrc

Verify Command Availability: After updating your PATH, check if awslocal is now recognized:

which awslocal
Selfforgetful answered 24/6 at 8:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.