How to Solve NameError: name 'interfaces' is not defined -- netifaces

Solution: Import the 'interfaces' module

To Solve the error, add the following line to the top of your code.

from netifaces import interfaces

 

For more information:
Python netifaces interfaces