How to Solve NameError: name 'pywraplp' is not defined -- ortools

Solution: Import the 'pywraplp' module

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

from ortools.linear_solver import pywraplp

 

For more information:
Python ortools pywraplp