Skip to content

Install Azure CLI from source code #31133

@jiasli

Description

@jiasli

When a new feature is merged into dev branch, you may test its functionality by installing Azure CLI from source code:

Windows

Prerequisite:

  1. Install latest Python 3.12 from https://www.python.org/downloads/windows/
  2. Install latest Git from https://git-scm.com/downloads

Run below commands in PowerShell:

git clone https://github.com/Azure/azure-cli --depth 1
python -m venv azure-cli-env
. azure-cli-env\Scripts\activate.ps1
python.exe -m pip install --upgrade pip
pip install --no-deps --editable azure-cli/src/azure-cli-core azure-cli/src/azure-cli azure-cli/src/azure-cli-telemetry
pip install --requirement azure-cli/src/azure-cli/requirements.py3.windows.txt

# You may run az commands now
az --version
az login

# After testing, deactivate the virtual environment and delete these folders
deactivate
Remove-Item -Recurse -Force azure-cli, azure-cli-env

Linux

Prerequisite: Install Python using the package manager of your Linux distribution.

Run below commands:

git clone https://github.com/Azure/azure-cli --depth 1
python3 -m venv azure-cli-env
. azure-cli-env/bin/activate
python -m pip install --upgrade pip
pip install --no-deps --editable azure-cli/src/azure-cli-core azure-cli/src/azure-cli azure-cli/src/azure-cli-telemetry
pip install --requirement azure-cli/src/azure-cli/requirements.py3.Linux.txt

# You may run az commands now
az --version
az login

# After testing, deactivate the virtual environment and delete these folders
deactivate
rm -rf azure-cli azure-cli-env

Metadata

Metadata

Assignees

Labels

Accountaz login/accountAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions