title: Creating executable from Python script while acquiring small output size
body: <p>My question might already have been answered somewhere but still, I can't find a straightforward answer to it yet.
  I want to create a standalone executable from python code. I've already tried a bunch of solutions like <code>py2exe</code>, <code>pyinstaller</code>, etc. But my problem is the large output file size. For example, in <code>pyinstaller</code> a simple hello world compile to 5MB file. After a lot of searches I've found <code>Cython</code> which creates a c file from python code then I tried to compile it with <code>MSVC 2015</code> and generated the exe file but it depends on <code>python3x.dll</code> file.</p>
  
  <p>So Is there any way to compile the python code to stand alone exe file with a small size?</p>
  
  <p>If it is not, how to bundle the executable file with <code>msvc</code>?</p>
  
  <p>I'm using python3.4 but is there any difference between python2 and 3 in this manner?
  I am using these commands to first generate c file then compile it to exe:</p>
  
  <pre><code>python -m cython test.py --embed
  cl  /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -Ic:\Python34\PC /Tctest.c /link /OUT:"test.exe" /SUBSYSTEM:CONSOLE /MACHINE:X64 /LIBPATH:c:\Python34\libs /LIBPATH:c:\Python34\PCbuild
  </code></pre>