I have a need to run az on my Pi's. Here's how to install it.

I use Debian on my Raspberry PI's. I needed to get the az cli tool running so I could connect to my Azure Container Registry through Docker. The issue is that Microsoft does not publish the arm64 binaries to their apt repository. Because of that, you have to manually install it using pip3.

A general outline of the steps

  1. Update your apt repository
  2. Install needed tools (python3-pip libffi-dev)
  3. Install az-cli
  4. Add ~/.local/bin to your path

Here are the commands to do the build and install it:

sudo apt update
sudo apt install python3-pip libffi-dev
pip3 install azure-cli

It will take a while, Pi's aren't exactly known for being super speedy at computational needs, like compiling.

After it is done building the binary, we need to add the ~/.local/bin to your path.

This is easy to do, vi ~/.profile

Add a line at the end that looks something like this:

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

Save and close with :wq and reload your profile with source ~/.profile.

Comments

After doing this az works the way it should for everything I need; even with the following message every time it executes:

/usr/lib/python3/dist-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)

Since this is personal environment and I am not going to be fretting over it I am calling this a win. It could be that this error is because I am doing this with Python3 instead of Python2. Maybe one day I will try it with 2.

Install the Azure CLI on Linux
Learn how to install and run the Azure CLI on Linux manually. You can install the Azure CLI on Linux computers with one command or a step-by-step process.
Support arm64 Linux builds · Issue #7368 · Azure/azure-cli
Is your feature request related to a problem? Please describe. azure-cli is available for amd64 through Microsoft's official repos for Debian, Ubuntu, and OpenSUSE. See Debian and Ubuntu repo a...
azure-cli
Microsoft Azure Command-Line Tools