【问题标题】:cx_freeze fails while running setup.py on Ubuntu在 Ubuntu 上运行 setup.py 时 cx_freeze 失败
【发布时间】:2022-01-18 08:35:05
【问题描述】:

为了为我的应用程序创建不同平台的可执行文件,我使用了 GitHub Actions。 MacOS 和 Windows 操作正常工作,但由于某种原因在 Ubuntu 上失败。它说即使它在其他平台上正确找到它也找不到文件。我使用带有 tcl 主题的 tkinter。

链接到我的应用的 GitHub:https://github.com/sumeshir26/TimerX

链接到我的 cx_freeze 设置脚本:https://github.com/sumeshir26/TimerX/blob/master/setup.py

GitHub 工作流文件链接:https://github.com/sumeshir26/TimerX/blob/master/.github/workflows/release-ubuntu.yml

失败日志:https://github.com/sumeshir26/TimerX/runs/4530058102

    Traceback (most recent call last):
  File "/home/runner/work/TimerX/TimerX/build/bdist.linux-x86_64/rpm/BUILD/TimerX-0.0.0/setup.py", line 62, in <module>
    setup(
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/dist.py", line 447, in setup
    setuptools.setup(**attrs)
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/dist.py", line 291, in run
    freezer: Freezer = Freezer(
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/freezer.py", line 1017, in __init__
    super().__init__(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/freezer.py", line 101, in __init__
    self.include_files: InternalIncludesList = process_path_specs(
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/cx_Freeze/common.py", line 78, in process_path_specs
    raise ConfigError(f"cannot find file/directory named {source!s}")
cx_Freeze.exception.ConfigError: cannot find file/directory named sun-valley.tcl
error: Bad exit status from /var/tmp/rpm-tmp.MGhMc0 (%build)
    Bad exit status from /var/tmp/rpm-tmp.MGhMc0 (%build)


RPM build errors:
error: command '/usr/bin/rpmbuild' failed with exit code 1
Error: Process completed with exit code 1.

(Python 3.10) 如果有人可以提供帮助,那就太好了。 谢谢!

【问题讨论】:

  • 欢迎来到 SO @sumeshir26。请将相关代码 sn-ps 与错误信息一起粘贴。链接和屏幕截图使有相同问题的人很难在这里找到您的问题:)
  • @rethab 当然,会添加的
  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: python python-3.x tkinter github-actions cx-freeze


【解决方案1】:

这似乎是 Python 错误,降级到 3.8 后,它可以工作。

【讨论】:

    猜你喜欢
    • 2014-02-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-21
    • 2023-02-14
    相关资源
    最近更新 更多