title: Pyinstaller EXE file crashes upon start
body: <p>I'm not sure if I am doing this right, this is my first time asking questions and it is about packing my little python program into EXE file that could run on any laptop. So I tried both cx_freeze and pyisntaller, it turns out that cx_freeze could not even install successfully and pyinstaller works, however the EXE file it generated automatically crashed without doing anything. My python program does not have any GUI and it is supposed to generate something upon start and then ask you to input data. Is it something wrong with my python code or the pyinstaller? 
  Because I tried both on my personal laptop and the desktop in the lab, different environment, same result.</p>
  
  <p>The code is attached below is from pyinstaller, it seems that there are a lot of warnings.</p>
  
  <p>Looking forward to your help guys, I need this running tomorrow....</p>
  
  <pre><code>2324 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
  2340 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
  2359 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
  2375 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
  2393 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
  2479 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2495 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2511 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2528 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2546 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2564 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2581 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2599 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2615 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2631 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2647 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2666 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  2686 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
  2703 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
  2719 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
  2737 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
  2753 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
  2756 INFO: Caching module hooks...
  2760 INFO: Analyzing D:\Test\DBS_real.py
  2820 INFO: Loading module hooks...
  2820 INFO: Loading module hook "hook-encodings.py"...
  2882 INFO: Loading module hook "hook-pydoc.py"...
  2883 INFO: Loading module hook "hook-xml.py"...
  3039 INFO: Looking for ctypes DLLs
  3039 INFO: Analyzing run-time hooks ...
  3043 INFO: Looking for dynamic libraries
  3063 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3079 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3096 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3112 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3128 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3144 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3160 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3178 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3194 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3212 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
  3236 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
  3252 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
  3270 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
  3286 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
  3303 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
  3323 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3339 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3355 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3371 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3389 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3407 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3424 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3441 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3457 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
  3478 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_lzma.pyd
  3495 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_lzma.pyd
  3514 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_socket.pyd
  3532 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_socket.pyd
  3554 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\unicodedata.pyd
  3570 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\unicodedata.pyd
  3586 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\unicodedata.pyd
  3612 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
  3628 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
  3644 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
  3660 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
  3678 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
  3697 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\select.pyd
  3700 INFO: Looking for eggs
  3700 INFO: Using Python library c:\users\jinze\appdata\local\programs\python\python36\python36.dll
  3700 INFO: Found binding redirects:
  []
  3707 INFO: Warnings written to D:\Test\build\DBS_real\warn-DBS_real.txt
  3735 INFO: Graph cross-reference written to D:\Test\build\DBS_real\xref-DBS_real.html
  3768 INFO: checking PYZ
  3768 INFO: Building PYZ because PYZ-00.toc is non existent
  3769 INFO: Building PYZ (ZlibArchive) D:\Test\build\DBS_real\PYZ-00.pyz
  4045 INFO: Building PYZ (ZlibArchive) D:\Test\build\DBS_real\PYZ-00.pyz completed successfully.
  4054 INFO: checking PKG
  4054 INFO: Building PKG because PKG-00.toc is non existent
  4055 INFO: Building PKG (CArchive) PKG-00.pkg
  5163 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
  5168 INFO: Bootloader c:\users\jinze\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
  5168 INFO: checking EXE
  5168 INFO: Building EXE because EXE-00.toc is non existent
  5169 INFO: Building EXE from EXE-00.toc
  5169 INFO: Appending archive to EXE D:\Test\dist\DBS_real.exe
  5358 INFO: Building EXE from EXE-00.toc completed successfully.
  </code></pre>