No module named 'nornir_utils'

2.5k views Asked by At

i am trying to work with nornir but i get this

whene i try this :

from nornir.plugins.functions.text import print_result

i get this:

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

i've also tried this:

from nornir_utils.plugins.functions import print_result

the probleme is still there:

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

can anyone help me solve this ?

1

There are 1 answers

0
Carlo Zanocco On BEST ANSWER

Looking in the nornir module docs there is no print_result function, but it is present in the nornir_utils module.

The plugins present in nornir are four, look here

You can install the nornir_utils module with pip install nornir_utils and the nornir module as pip install nornir.

The corrent import to do is from nornir_utils.plugins.functions import print_result.

Make sure to use the right pip to install the packages, sometimes I install in the wrong env having multiple python installation.