ImportError: cannot import name 'BatchManagementClient' from 'azure.mgmt.batch'
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az network traffic-manager profile check-dns
Errors:
cannot import name 'BatchManagementClient' from 'azure.mgmt.batch' (/usr/lib/python3/dist-packages/azure/mgmt/batch/__init__.py)
Traceback (most recent call last):
python3/dist-packages/knack/cli.py, ln 231, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 558, in execute
self.commands_loader.load_arguments(command)
...
network/private_link_resource_and_endpoint_connections/resource_providers/batch_provider.py, ln 6, in <module>
from azure.mgmt.batch import BatchManagementClient
ImportError: cannot import name 'BatchManagementClient' from 'azure.mgmt.batch' (/usr/lib/python3/dist-packages/azure/mgmt/batch/__init__.py)
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Put any pre-requisite steps here…
az network traffic-manager profile check-dns {}
Expected Behavior
Environment Summary
Linux-5.10.0-kali9-amd64-x86_64-with-glibc2.31
Python 3.9.2
Installer: DEB
azure-cli 2.18.0 *
Extensions:
azure-devops 0.19.0
Additional Context
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
cannot import name 'BatchManagementClient' from 'azure ...
Describe the bug. When running the command below, I previously would get a list of IP addresses. Now I get the error attached....
Read more >#989670 - azure-cli: az network commands throw ImportError
... The command failed with an unexpected error. Here is the traceback: cannot import name 'BatchManagementClient' from 'azure.mgmt.batch' ...
Read more >azure-mgmt-batch 17.0.0 - PyPI
This is the Microsoft Azure Batch Management Client Library. This package has been tested with Python 3.7+. For a more complete view of...
Read more >Bug#989670: azure-cli: az network commands throw ImportError
CLIInternalError: The command failed with an unexpected error. Here is the traceback: cannot import name 'BatchManagementClient' from 'azure.
Read more >Get Keys - REST API (Azure Batch Management)
An error response from the Batch service. BatchAccountKeys. A set of Azure Batch account keys. Name, Type, Description. accountName.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I noticed a weird thing. The official Azure CLI DEB installer has its bundled Python 3.6.10.
But in all linked issues, Python is 3.9.* and Azure CLI is 2.18.0:
Could you let me know the distribution of Linux you are using by running
Where did you install this Linux? From official installation source? From docker?
Before installing the official Azure CLI, please remove the pre-installed Azure CLI, which is not maintained by Microsoft:
@Phoenix1112, please notice installing on Kali Linux with
apt
is currently not supported (#19369). Please usepip
to install.