命令失败,出现意外错误。以下是回溯:
No module named 'prompt_toolkit.interface'
Traceback (most recent call last):
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/interactive/custom.py", line 41, in start_shell
File "C:\Users\zahari.mladenov\.azure\cliextensions\interactive\azext_interactive\__init__.py", line 10, in start_shell
from .azclishell.app import AzInteractiveShell
File "C:\Users\zahari.mladenov\.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 open an issue, please run: 'az feedback'
我正在尝试运行Azure交互模式,但每次它都显示这些错误,有什么想法如何修复它们吗?
我已经尝试卸载并重新安装prompt_toolkit.interface与pip install promp_toolkit
,通过Azure门户将其挂载到另一个存储帐户,在本地计算机上从头开始安装Azure CLI,但似乎没有任何工作。我的Python版本是3.10,所有Azure CLI版本都是最新的。如果有人能帮助我解决这个问题,那就太好了。因为我是Azure Powershell的新手,交互模式确实帮助我学习新命令和如何编写。
1条答案
按热度按时间waxmsbnn1#
当我在本地Windows PowerShell或Azure CLI命令提示符中运行命令
az interactive
时,由于az
模块版本2.41.0
,我收到相同的错误。然后,我将
az
模块升级到2.42.0
,然后在Windows PowerShell和Azure CLI命令提示符中本地运行cmdletaz interactive
:Windows PowerShell操作系统:
Azure CLI本地命令提示符:
有关详细信息,请参阅interactive-azure-cli的MS Doc。