pythonpython-3.7py2exe

Getting error while installing py2exe for python 3.7.9 version


I am using Pycharm on Windows 10 and needed to install py2exe package. So I tried to install it with the github repository "https://github.com/lambacck/py2exe-3 ". I don't know what is the problem. If you know please give the fixes.

After sometimes it comes with the output as,

It seems that you are using distutils.command.build to add new subcommands. Using distutils directly is considered deprecated, please use setuptools.command.build.

      By 2023-Dec-13, you need to update your project and remove deprecated calls
      or your builds will no longer be supported.
    
      See https://peps.python.org/pep-0632/ for details.
      ********************************************************************************

!! missing_cmds = set(build.get_sub_commands()) - \_ORIGINAL_SUBCOMMANDS error: 'ext_modules' option must be a list of Extension instances \[end of output\]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully. exit code: 1

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Solution

  • A more up to date version of py2exe is hosted in https://github.com/py2exe/py2exe, so try installing from there or with pip. Keep in mind, 0.13.0.0 dropped support for Python 3.7 so you'll have to use an earlier version like 0.12.0.2

    To install with pip

    pip install py2exe==0.12.0.2