How to Solve NameError: name 'wget' is not defined

Solution: Import the 'wget' module

# Add the following line to the top of your code
import wget

 

For more information:
Python wget