Description
Describe the bug
I have python 3.11 and installed azure-cli 2.29 using the command pip3 install azure-cli==2.29
, everything ran successfully. However, I was not able to run any az commands, any command would give me the following error:
The command failed with an unexpected error. Here is the traceback:
argument _subcommand: conflicting subparser: list
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 560, in execute
self.parser.load_command_table(self.commands_loader)
File "/opt/homebrew/lib/python3.11/site-packages/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 1192, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
argparse.ArgumentError: argument _subcommand: conflicting subparser: check-name
note that check-name could be other commands such as login, list etc.
I have tried cleaning up things and reinstall things, nothing works. Can someone help here?
Related command
brew install python3
pip3 install azure-cli==2.29
az login
The command failed with an unexpected error. Here is the traceback:
argument _command_package: conflicting subparser: login
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 560, in execute
self.parser.load_command_table(self.commands_loader)
File "/opt/homebrew/lib/python3.11/site-packages/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 1192, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
argparse.ArgumentError: argument _command_package: conflicting subparser: login
To open an issue, please run: 'az feedback'
Errors
The command failed with an unexpected error. Here is the traceback:
argument _command_package: conflicting subparser: login
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 560, in execute
self.parser.load_command_table(self.commands_loader)
File "/opt/homebrew/lib/python3.11/site-packages/azure/cli/core/parser.py", line 100, in load_command_table
command_parser = subparser.add_parser(command_verb,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 1192, in add_parser
raise ArgumentError(self, _('conflicting subparser: %s') % name)
argparse.ArgumentError: argument _command_package: conflicting subparser: login
To open an issue, please run: 'az feedback'
Issue script & Debug output
no script
Expected behavior
The commands should run without issue
Environment Summary
azure-cli 2.29.0 *
core 2.29.0 *
telemetry 1.0.6 *
Python location '/opt/homebrew/opt/python@3.11/bin/python3.11'
Extensions directory '/Users/lali/.azure/cliextensions'
Python (Darwin) 3.11.4 (main, Jul 25 2023, 17:36:13) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response