Skip to content

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

@eliassal

Description

@eliassal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Service AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions