为 python 3.7.9 版本安装 py2exe 时出现错误

问题描述 投票:0回答:1

我在 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 python-3.7 py2exe
1个回答
0
投票

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

使用pip安装

pip install py2exe==0.12.0.2

© www.soinside.com 2019 - 2024. All rights reserved.