title: Can't create an executable of a script using tkinter with pyinstaller
body: <p>I have a trivial script which I'd like to convert to a single .exe file. No matter what I do, though, neither py2exe nor pyinstaller can handle including tkinter into the file. As a consequence, a command for pyinstaller like:</p>
  
  <pre><code>&gt;python pyinstaller.py --onefile --hidden-import=Tkinter FacebookPhotoRandomizer.py
  </code></pre>
  
  <p>Results in creating the file but then when I try to run it, I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;string&gt;", line 2, in &lt;module&gt;
  ImportError: No module named tkinter
  FacebookPhotoRandomizer returned -1
  </code></pre>
  
  <p>I've tried to make the tkinter import as explicit as it gets so the header part of my script looks like this:</p>
  
  <pre><code>import tkinter
  import os, imghdr, random, pyperclip
  from tkinter import messagebox
  </code></pre>
  
  <p>Though the error persists. How can I solve this?</p>