title: How to include only needed modules in pyinstaller?
body: <p>I'm using <code>pyinstaller</code> to generate an <code>.exe</code> file for my single python file, but the size is more than 30MB and the startup is very slow. From what I have gathered is that <code>pyinstaller</code> by default bundles a lot of stuff that are not needed. Is there a way to make sure that <code>pyinstaller</code> figures out what is only needed and bundles only them? My import section on my script looks like this:</p>
  
  <pre><code>import datetime
  import os
  import numpy as np
  import pandas as pd 
  import xlsxwriter
  from tkinter import *
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Or is there also a way to see the list of all modules it has bundled? So I can go through them and exclude the ones I don’t need.</p>