0

I am trying to compile my Python file to an Onefile-EXE with py2exe using this code for the setup file:

import py2exe, sys, os

sys.argv.append('py2exe')

setup(
    options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
    windows = [{'script': "program.py"}],
    zipfile = None,
)

The problem is whenever I compile the code I get this error in Command Prompt: CMD Error py2exe

I don't want to use pyinstaller to compile because that makes all my EXE files look like malware.

I have looked all over stackoverflow for an answer to this (some other ones had a similar but not exact error)

Thanks!

dean0
  • 1
  • 1
    You have to post errors as formatted text in your question, not as screenshots (or comments). – Random Davis Jan 14 '21 at 18:44
  • Also, what happens if you change `bundle_files` to `2`, like with this answer? https://stackoverflow.com/questions/44013280/py2exe-missing-modules-when-bundling – Random Davis Jan 14 '21 at 18:46
  • When I change it I get the same error but this time it compiles after the error. The problem is it isn't a One-file EXE it has necessary libraries within its 'dist' folder. – dean0 Jan 15 '21 at 03:15

0 Answers0