How to Solve NameError: name 'package.submodule' is not defined

Solution: Import the 'package.submodule' module

# Add the following line to the top of your code
import package.submodule

 

For more information:
Python package.submodule