title: How to include a Microsoft Visual C++ Redistributable package in a python cx_freeze application
body: <p><strong>CONTEXT</strong></p>
  <p>I'm trying to build a python tkinter application using <code>cx_freeze</code>, and I successfully build the .exe. Here is my setup.py:</p>
  <pre class="lang-py prettyprint-override"><code>import sys
  from cx_Freeze import setup, Executable
  
  version = &quot;0.7.6&quot;
  author = &quot;Me&quot;
  
  base = None
  
  if sys.platform == &quot;win32&quot;:
      base = &quot;Win32GUI&quot;
  
  build_exe_options = {&quot;include_files&quot;: [&quot;assets/&quot;, &quot;files/&quot;], &quot;excludes&quot;: [&quot;matplotlib.tests&quot;, &quot;numpy.random._examples&quot;], 
  &quot;include_msvcr&quot;: True}
  
  setup(
      name=&quot;Application&quot;,
      version=version,
      description=f&quot;Application {version}&quot;,
      author=author,
      options={&quot;build_exe&quot;: build_exe_options},
      executables=[Executable(script=&quot;main.py&quot;, base=base, targetName=&quot;App.exe&quot;, icon=&quot;assets/Logo.ico&quot;)]
  )
  
  </code></pre>
  <p><strong>IDENTIFICATION OF THE PROBLEM</strong></p>
  <p>However, some libraries I use in the Python code, like <code>matplotlib</code>, can only be compiled with Visual Studio 2015 or later (see the <a href="https://matplotlib.org/3.3.2/users/installing.html" rel="nofollow noreferrer">documentation</a>). I have Visual Studio 2019 on my computer so everything works fine on it but I tried running the app on another Windows computer which only has Microsoft Visual C++ 2010 Redistributable package (and I guess the 2010 compiling tools), and the app crashed before lauching with this main error:</p>
  <p>ImportError: DLL load failed while importing ft2font: the specified module was not found.</p>
  <p>Based on the discussions <a href="https://github.com/matplotlib/matplotlib/pull/14316" rel="nofollow noreferrer">here</a>, I figured this error means that Visual Studio requirements are not met (i.e 2015 or later) and as indicated at the end of this <a href="https://github.com/matplotlib/matplotlib/issues/14558" rel="nofollow noreferrer">discussion</a>, matplotlib wheels don't include C++ runtime DLLs for version &gt; 3.3.0. Before asking my question, I must say my understanding of how python libraries are compiled or what wheels are is very limited and I don't even really know which C++ runtime DLLs are involved in the compilation of my built application.</p>
  <p><strong>QUESTION</strong></p>
  <p>How can I include Microsoft Visual C++ 2015 Redistributable package (assuming that is legal) in my app?</p>
  <p>A simple solution for me would be to include all necessary dependancies in my project without having the user to install a Visual Studio C++ 2015+ version on its computer, so if you have any idea on how to achieve that with cx_freeze or even some other tools I might look into, I thank you in advance for your help.</p>
  <p>Paul</p>
  <p>P.S: as you can see, I tried the <code>&quot;include_msvcr&quot;</code> key from the build_exe_options but that didn't solve my problem (plus I think msvcp.dll is included by default)</p>
  <p><strong>UPDATE</strong></p>
  <p>I manually included vcruntime140_1.dll, msvcp140_1.dll in the directory and the app is now launching, but the window is not displayed correctly, its frame doesn't appear, so problem not solved yet.</p>