NameError: name 'defaultParams' is not defined is an error which occurs when trying to create an executable with PyInstaller 3.x using code that uses matplotlib and the Matplotlib 3.3.x package.
Until this issue is fixed the current solution is to pin matplotlib to 3.2.2
Change the matplotlib version in requirements.txt or other dependency configuration to:
And then use pip to install this version into your virtual environment:
pip install --upgrade -r requirements.txt