How to Solve NameError: name 'function2' is not defined -- package2

Solution: Import the 'function2' module

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

from package2.subpackage1.module5 import function2

 

For more information:
Python package2 function2