没有名为“ nornir_utils”的模块

问题描述

我正在尝试与nornir合作,但我明白了

当我尝试此操作时:

from nornir.plugins.functions.text import print_result

我明白了:

ModuleNotFoundError: No module named 'nornir.plugins.functions.text'

我也尝试过这个:

from nornir_utils.plugins.functions import print_result

问题仍然存在:

ModuleNotFoundError: No module named 'nornir.plugins.functions.text'

有人可以帮我解决这个问题吗?

解决方法

nornir模块文档中没有print_result函数,但在nornir_utils模块中存在。

div中提供的插件有四个,外观为here

您可以将nornir模块和nornir_utils一起安装,并将pip install nornir_utils模块作为nornir来安装。

要导入的当前费用为pip install nornir

请确保使用正确的pip来安装软件包,有时我会在安装了多个python的错误环境中安装。