I use Python 2.7 Windows 8.
When I was faced with this problem, it is still not aware of how much it has pitfalls. Here I want to present all of the options that I have encountered and tested, as well as the option that I eventually helped.
1) I checked the spelling used by the module Tkinter or tkinter.
2) I read about how to use the pyinstaller
, when used in the project modules:tkinter
and matplotlib
then was able to give upmatplotlib
, but it also did not affect the solution to my problem.
3) Adds path to the module from the command line with the parameter p
PyInstaller -y -F --distpath="." -p "C:\Python27\Lib\lib-tk" test.py
4) Connect only the necessary parts of the module https://groups.google.com/forum/#!topic/pyinstaller/vtbKKt6v0is
5) Use pyinstaller option --hiddenimport=Tkinter
and commented rows excludedimports
in files \PyInstaller\hooks\hook-PIL.py
and hook-PIL.SpiderImagePlugin.py
https://github.com/pyinstaller/pyinstaller/issues/1584