1

I have a pygame project I am trying to compile to an exe file. I have a spec file, which looks like this:

# -*- mode: python -*-


block_cipher = None


a = Analysis(['main.py'],
             pathex=['C:\\Users\\vedant\\PycharmProjects\\pygame\\Blackjack'],
             binaries=None,
             datas=None,
             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, 
          Tree('Resources', prefix='data'),
          a.scripts,
          a.binaries,
          a.zipfiles,
          name='blackjack',
          a.datas,
          debug=False,
          strip=False,
          upx=True,
          console=False )

But when I run, I get an error UPX is not available. What is wrong here?

vkumar
  • 863
  • 4
  • 9
  • 14
  • I am having trouble with this too. I have heard that many people had a bad experience with pygame2exe, I hope someone figures out the solution. – Jerrybibo May 26 '16 at 23:25
  • Do us all a favor and look through your spec to make sure there aren't any typos. I don't see any, but you know your project better than anyone. Aside from that, I have no idea why this might be happening. – Nic May 28 '16 at 20:23
  • Try disabling UPX – sloth Jan 25 '21 at 19:57

0 Answers0