title: How do I use UPX with pyinstaller?
body: <p>How do I use UPX  with pyinstaller?</p>
  
  <p>I am following the docs.</p>
  
  <p>I have downloaded UPX.</p>
  
  <p>My file looks like:</p>
  
  <pre><code>import csv
  import selenium
  import pandas
  
  print('Hello')
  </code></pre>
  
  <p>I then run:</p>
  
  <pre><code>pyinstaller -F --upx-dir C:\Users\DD\Downloads\upx394w\upx394w\123\upx308w\upx.exe zz.spec
  </code></pre>
  
  <p>This does not affect the size of the file. </p>
  
  <p>Any idea how I can get this to work?</p>
  
  <pre><code># -*- mode: python -*-
  
  block_cipher = None
  
  
  a = Analysis(['zz.py'],
               pathex=['C:\\Users\\DA\\13\\14'],
               binaries=[],
               datas=[],
               hiddenimports=[],
               hookspath=[],
               runtime_hooks=[],
               excludes=[],
               win_no_prefer_redirects=False,
               win_private_assemblies=False,
               cipher=block_cipher)
  pyz = PYZ(a.pure, a.zipped_data,
               cipher=block_cipher)
  exe = EXE(pyz,
            a.scripts,
            a.binaries,
            a.zipfiles,
            a.datas,
            name='zz',
            debug=False,
            strip=False,
            upx=True,
            runtime_tmpdir=None,
            console=True )
  </code></pre>