Error on running tkinter exe made with cx_freeze
<p>I'm trying to create a standalone exe from a script writen in Python 3.5 using cx_Freeze to be able to run it on computers without Python.</p>

<p>The program itself is just a small calculator with a simple UI using tkinter.
Im using Windows 10.</p>

<p>I created a setup script that looks like this.</p>

<pre><code>import sys
from cx_Freeze import setup, Executable
# replaces commandline arg 'build'
sys.argv.append("build")

filename = "Widgets_tmp.py"
base = None
if sys.platform == "win32":
    base = "Win32GUI"
setup(
    name = "Widgets",
    version = "1.0",
#   options={"build_exe": {"packages": ["tkinter"]}},
    description = "cx_Freeze Tkinter script",
    executables = [Executable(filename, base=base)])
</code></pre>

<p>This runs without problems until i try to run the exe. Then I get this error:</p>

<pre><code>Traceback (most recent call last):
  File "C:\python64\lib\site-packages\cx_freeze\initscripts\Console.py"
line 21, in &lt;module&gt;
    exec(code, m.__dict__)
  File "Widgets_tmp.py", line 1, in &lt;module&gt;
  File "C:\python64\lib\tkinter\__init__.py", line 35, in &lt;module&gt;
    import _tkinter#If this fails you Python may not be configured for Tk
ImportError: DLL load failed:
</code></pre>

<p>I tried including tkinter manualy in the code commented out in the code and in "includes" instead of "packages" but with the same results.</p>

<p>perhaps i should say that line 1 in Widgets_tmp.py looks like this:</p>

<pre><code>import tkinter as tk
</code></pre>

<hr>

<p>I tried freezing the sample code from the source but get the same error. Both codes work perfect using python.</p>

<p>I also tried using:</p>

<pre><code>options={"build_exe": {"includes": ["tkinter"]}},
</code></pre>

<p>but no luck.</p>