How to Solve NameError: name 'PrettyTable' is not defined -- prettytable

Solution: Import the 'PrettyTable' module

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

from prettytable import PrettyTable

 

For more information:
Python prettytable PrettyTable