`az interactive` fails to start: ModuleNotFoundError: No module named 'prompt_toolkit.interface'
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az interactive
Errors:
The command failed with an unexpected error. Here is the traceback:
No module named 'prompt_toolkit.interface'
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/homebrew/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/homebrew/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/homebrew/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
return self.handler(*args, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/homebrew/Cellar/azure-cli/2.41.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/interactive/custom.py", line 41, in start_shell
azext_interactive.start_shell(cmd, style=style)
File "/Users/davide.agnello/.azure/cliextensions/interactive/azext_interactive/__init__.py", line 10, in start_shell
from .azclishell.app import AzInteractiveShell
File "/Users/davide.agnello/.azure/cliextensions/interactive/azext_interactive/azclishell/app.py", line 33, in <module>
from prompt_toolkit.interface import Application, CommandLineInterface
ModuleNotFoundError: No module named 'prompt_toolkit.interface'
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 interactive
Expected Behavior
Environment Summary
macOS-12.5.1-arm64-arm-64bit, Darwin 21.6.0
Python 3.10.8
Installer: HOMEBREW
azure-cli 2.41.0
Extensions:
interactive 0.4.5
Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1
Additional Context
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
az interactive fails: No module named 'prompt_toolkit.interface'
Describe the bug. Command Name az interactive. Errors: No module named 'prompt_toolkit.interface' Traceback (most recent call last): ...
Read more >[Fixed] ModuleNotFoundError: No module named 'prompt-toolkit'
The most frequent source of this error is that you haven't installed prompt-toolkit explicitly with pip install prompt-toolkit . Alternatively, you may have ......
Read more >Can't start Azure Interactive mode - Stack Overflow
When I run the command az interactive either in Local Windows PowerShell or Azure CLI Command Prompt, I'm getting the same error because...
Read more >"az interactive" command does not work in Microsoft Learn ...
The command failed with an unexpected error. Here is the traceback: No module named 'prompt_toolkit.interface'; Traceback (most recent call ...
Read more >No module named 'prompt toolkit enums' - YouTube
Getting error can be frustrating specially if you are working on some idea. Recently I started to get error in my jupyter notebook...
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 FreeTop 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
Top GitHub Comments
In https://github.com/Azure/azure-cli/pull/22459,
mycli
is added in dependency, which requiresprompt-toolkit
.azure-cli
installs 3.0.31 andinteractive
wants 1.0.18, so the conflict occurs.@taoyama your suggestion worked, thanks!