My issue is little different from existing ones on the WEB. Let me try highlighting it in detail. I have this code to do some plotting by reading a .txt file specified. I was going to build it as usually as I did before. My setup.py is supposed to do the job. The content of setup.py is here
As you can observe I have no any package related to tkinter in both my above files. I did python setup.py build
in terminal and it executed well. But can't use my actual code with windows command script
build\\exe.win-amd64-3.5\\draw_precision_recall_curve.exe D:\dataset\Fire_Smoke\Train\filelist.txt
pause
It throws this trace:
Traceback (most recent call last):
File "C:\python354\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 14, in run
module.run()
File "C:\python354\lib\site-packages\cx_Freeze\initscripts\Console.py", line 26, in run
exec(code, m.__dict__)
File "draw_precision_recall_curve.py", line 3, in <module>
import matplotlib.pyplot as plt
File "C:\python354\lib\site-packages\matplotlib\pyplot.py", line 115, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "C:\python354\lib\site-packages\matplotlib\backends\__init__.py", line 62, in pylab_setup
[backend_name], 0)
File "C:\python354\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 4, in <module>
from . import tkagg # Paint image to Tk photo blitter extension.
File "C:\python354\lib\site-packages\matplotlib\backends\tkagg.py", line 5, in <module>
from six.moves import tkinter as Tk
File "C:\python354\lib\site-packages\six.py", line 92, in __get__
result = self._resolve()
File "C:\python354\lib\site-packages\six.py", line 115, in _resolve
return _import_module(self.mod)
File "C:\python354\lib\site-packages\six.py", line 82, in _import_module
__import__(name)
ImportError: No module named 'tkinter'
I was not able to solve this looking at the related posts here and there. Any help is appreciated.