安装python 3.7.9版本的py2exe时出错

Getting error while installing py2exe for python 3.7.9 version

提问人:Arun Jothi 提问时间:10/26/2023 最后编辑:TzaneArun Jothi 更新时间:10/26/2023 访问量:39

问:

我在 Windows 10 上使用 Pycharm,需要安装 py2exe 包。所以我尝试使用 github 存储库“https://github.com/lambacck/py2exe-3”安装它。我不知道问题出在哪里。如果您知道,请提供修复。

有时它附带输出,

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.
python-3.7 py2 exe

评论


答:

0赞 Tzane 10/26/2023 #1

https://github.com/py2exe/py2exe 中托管了更新的版本,因此请尝试从那里安装或使用 .请记住,0.13.0.0 放弃了对 Python 3.7 的支持,因此您必须使用早期版本,例如 0.12.0.2py2exepip

使用 pip 安装

pip install py2exe==0.12.0.2