title: Problems with Pyinstaller with tkinter app on python 3.5
body: <p>Just getting started with Pyinstaller (and somewhat with Tk windowing) and having trouble getting my tkinter windows app (under python 3.5) running successfully. I may be doing something stupid but I've tried everything I know and I really need to get this running, so any help is greatly appreciated.  Just a note, all of my code runs fine under normal python 3.5.1 &amp; 3.5.3. Have latest version of PyInstaller installed (3.2.1) and it appears to be running OK.</p>
  
  <p>I switched over to the following simple windowed "Hello World!" app to see if I could get this to work,</p>
  
  <pre><code>from tkinter import *
  root = Tk()
  root.title("Test Window")
  
  #Setup window widgets and place on window
  l1 = Label(root,text='Hello World!',font=("Verdana",18))
  l2 = Label(root,text='Hello World!',font=("Times New Roman",9))
  b1 = Button(root, text='Button 1', font=("Verdana",12), state=DISABLED)
  b1.pack()
  b1.place(x=220, y=180)
  
  l1.pack()
  l1.place(x=170, y=10)
  l2.place(x=200, y=60)
  
  root.mainloop()
  </code></pre>
  
  <p>but it appears to be having the same issues as my original application.  </p>
  
  <p>Maybe it's just because I'm new to PyInstaller but I'm not finding the docs really easy to find specific answers from.  But looking a little deeper, I decided to add the -d option to the command line to see the debug output as it tried to execute my app, so the complete command line I'm using is: <strong>> pyinstaller -F -w -d c:\PythonApps\Hello.py</strong> . That gave me lots of info ending in this error message:</p>
  
  <p><strong>Failed to execute script pyi_rth_tkinter.</strong></p>
  
  <p>This was the same error I saw for my original program. I was able to find 'pyi_rth_tkinter.py' on my system (actually 2 versions of the file), not sure why PyInstaller is having problems executing it.  But since that file spits out error messages about path problems for Tcl &amp; Tk data directories, guessing it would have failed on that anyway even if it had found &amp; ran the file. </p>
  
  <p>OK, looking more closely at the output during the running of PyInstaller, I see that there are a few lines that look like they may be leading to my problem:</p>
  
  <pre><code>3541 INFO: Loading module hook 'hook-_tkinter.py'
  ImportError: cannot import name 'Tcl'
  3659 ERROR: Tcl/Tk improperly installed on this system.
  </code></pre>
  
  <p>I looked at the "hook-_tkinter.py" hook file (and read through the PyInstaller docs) but didn't see anything obviously amiss.  But I'm not fully aware of all the details of the hook files and exactly what they need to contain (can anyone help with this???). Not exactly sure what the problem is but it appears PyInstaller is having an issue with linking into tkinter and that is causing my app(s) not to run. HAS ANYONE GOTTEN PyInstaller 3.2.1 TO EXECUTE EVEN A SIMPLE PYTHON 3.5 WINDOWS APP?  IF SO, PLEASE SHARE HOW!  I've done a ton of searching and reading but have not been able to uncover what the problem is yet.  If anyone has a clue, please help.  Any guidance is greatly appreciated!</p>
  
  <hr>
  
  <p>A bit of additional info.  Not sure why PyInstaller is saying Tcl/Tk is not properly installed. I just installed Python 3.5.3 and tkinter was installed automatically.  Executed <strong>'tkinter._text()'</strong> in a shell and it appears to work fine.  All my uses of tkinter also appear to work fine under all versions of 3.5 under normal use of python. Only tkinter problem I'm having is with PyInstaller.  Verified the exact version of Tcl/Tk installed with <strong>'tkinter.Tcl().eval('info patchlevel')'</strong> and it reported <strong>'8.6.4'</strong>.  Does anyone know of any other installation issues with Tcl/Tk that may be a problem?  I did not do anything special to install tkinter, I just did a normal install of pyinstaller via <strong>'pip install pyinstaller'</strong> after doing a fresh install of <strong>'python 3.5.3'</strong>. Was there anything else I should have done?  Any help is greatly appreciated!!!</p>