-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamPossible-SolutionSimilar-IssuequestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Describe the bug
All az commands fail to run when in the following configuration:
- Azure Linux 3
azure-cliinstalled viatdnf- A venv is activated
- The venv has some
azurepackages installed, but notazure.cli
Related command
az --version
Errors
% az --version
azure-cli 2.75.0
core 2.75.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.2
connectedk8s 1.10.7
k8s-extension 1.6.5
Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0
Python location '/usr/bin/python3.12'
Config directory '/home/acsa/.azure'
Extensions directory '/home/acsa/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.12/site-packages/azure-cli-extensions'
Python (Linux) 3.12.9 (main, Jun 12 2025, 19:38:44) [GCC 13.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
% . .venv/bin/activate
(redacted) % /usr/bin/az --version
/workspace/redacted/redacted/.venv/lib/python3.12/site-packages/azure/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
/workspace/redacted/redacted/.venv/bin/python3.12: No module named azure.cli
(redacted) % ls .venv/lib64/python3.12/site-packages/azure | wc -l
11
(redacted) % ls .venv/lib64/python3.12/site-packages/azure/cli
ls: cannot access '.venv/lib64/python3.12/site-packages/azure/cli': No such file or directory
(redacted) % deactivate
% az --version
azure-cli 2.75.0
core 2.75.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.2
connectedk8s 1.10.7
k8s-extension 1.6.5
Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0
Python location '/usr/bin/python3.12'
Config directory '/home/acsa/.azure'
Extensions directory '/home/acsa/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.12/site-packages/azure-cli-extensions'
Python (Linux) 3.12.9 (main, Jun 12 2025, 19:38:44) [GCC 13.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.Issue script & Debug output
az --debug --version
/workspace/redacted/redacted/.venv/lib/python3.12/site-packages/azure/__init__.py:5: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
/workspace/redacted/redacted/.venv/bin/python3.12: No module named azure.cliExpected behavior
I would expect the same behavior from az with the venv both activated and not.
Environment Summary
% az --version
azure-cli 2.75.0
core 2.75.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.2
connectedk8s 1.10.7
k8s-extension 1.6.5
Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0
Python location '/usr/bin/python3.12'
Config directory '/home/acsa/.azure'
Extensions directory '/home/acsa/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.12/site-packages/azure-cli-extensions'
Python (Linux) 3.12.9 (main, Jun 12 2025, 19:38:44) [GCC 13.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.Additional context
No response
omzevall
Metadata
Metadata
Assignees
Labels
Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamPossible-SolutionSimilar-IssuequestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that