I'm trying to freeze a console-based program that uses matplotlib.pyplot to generate and save plots. (I don't need to preview or view the plots in anyway before they are saved.) Here's my setup.py script:
from cx_Freeze import setup, Executable
import os
os.environ['TCL_LIBRARY'] = "C:\\Program Files\\Anaconda3\\tcl\\tcl8.6"
os.environ['TK_LIBRARY'] = "C:\\Program Files\\Anaconda3\\tcl\\tk8.6"
setup(name='FLOUResence.exe',
version='0.1',
options = {"build_exe": {"packages":["pandas", "numpy", "scipy", "matplotlib"]}
},
executables = [Executable(script='caller.py', targetName='FLOUResence.exe',
icon="icon.ico", base='Console')]
)
I can compile the program, but when I run the graphing module it returns the following error:
This application failed to start because it could not find or load the Qt platform plugin "windows" in "".
Reinstalling the application may fix this problem.
From what I can tell, because matplotlib wants to load/use the Qt GUI, but because it's a console application cx_freeze doesn't load Qt? Is this a correct interpretation of the problem? Any thoughts on how to solve this problem?