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

Solution: Import the 'bs4' module

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

 

For more information:
Python bs4