Azure / Azure/azure-cli

Unable to load extension 'bastion: No module named msrestazure'

Open
#31,886 5 comments 0 reactions 0 assignees View on GitHub
bug customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

I am trying to run
az peering peering list --ResourceGroupG "deve-vnet"

I get
C:\Users\s....\.azure\cliextensions\azure-devops\azext_devops\dev\__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
Unable to load extension 'bastion: No module named 'msrestazure''. Use --debug for more information.

### Related command

az peering peering list

### Errors

C:\Users\s....\.azure\cliextensions\azure-devops\azext_devops\dev\__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
Unable to load extension 'bastion: No module named 'msrestazure''. Use --debug for more information.

### Issue script & Debug output

C:\Users\s....\.azure\cliextensions\azure-devops\azext_devops\dev\__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
Unable to load extension 'bastion: No module named 'msrestazure''. Use --debug for more information.

### Expected behavior

Get a list of peerings inside a resource group

### Environment Summary

azure-cli 2.75.0

core 2.75.0
telemetry 1.1.0

Extensions:
account 0.2.5
automation 1.0.0b1
azure-devops 1.0.0
bastion 0.3.0
containerapp 1.1.0b2
interactive 0.5.3
next 0.1.3
resource-graph 2.1.0
spring-cloud 3.1.8
storage-preview 1.0.0b1

Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\salam.SALAM\.azure'
Extensions directory 'C:\Users\salam.SALAM\.azure\cliextensions'

Python (Windows) 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.