I can not convert .py to exe (cx_Freeze error: no commands supplied)

54 Views Asked by At

I'm trying to create a executable from my .py file.

I did this:

from cx_Freeze import setup, Executable
 
buildOptions = dict(packages=['matplotlib', 'pandas', 'tkinter', 'numpy', 'math', 'sympy'])

exe = [Executable('calculator.py')]

setup(
    name='load impedance calculator',
    version='0.0.1',
    author='me',
    description = 'description',
    options = dict(build_exe = buildOptions),
    executables = exe
)

And run from Python GUI. It returns the follow erros:

DistutilsArgError: no commands supplied


During handling of the above exception, another exception occurred:

SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied

I using Python 3.11 and cx_Freeze-6.15.9

thanks for any help!

I want to convert calculator.py to exe file

0

There are 0 best solutions below