【问题标题】:How to build PyQt6 app designed as MVC with pyinstaller?如何使用 pyinstaller 构建设计为 MVC 的 PyQt6 应用程序?
【发布时间】:2022-11-03 19:03:31
【问题描述】:

我最近编写了一个程序来从视频和音频文件中提取字幕。接口是用PyQt6写的,编译有问题。我无法使用 fbs,因为我使用的是 Python 3.10。我得到一个TypeError 'bytes' 对象不能被解释为整数传统上使用 pyinstaller,但是当我使用 Python 解释器运行时,一切正常。这是我项目的架构,主文件是 view.pyc 文件。您可以通过link 直接访问 Github 上的代码。

reader
|-- README.md
|-- __init__.py
|-- assets
|   |-- __init__.py
|   |-- chunks
|   |-- icon.svg
|   |-- py
|   |   |-- __init__.py
|   |   `-- subtitler.py
|   |-- screenshot_subtitler_1.png
|   |-- state.cfg
|   |-- ui
|   |   `-- subtitler.ui
|   `-- user.cfg
|-- controller.py
|-- models.py
|-- requirements.txt
|-- tests.py
|-- tree.txt
|-- view.pyw

我需要命令将这个项目构建为可执行文件。

【问题讨论】:

  • 这回答了你的问题了吗? How to convert Python project into executable
  • 从哪里得到错误,从编译过程中还是在运行二进制文件时?
  • 不是真的,它没有回答我的问题。我从编译过程中得到这个错误。

标签: python pyqt pyinstaller pyqt6


【解决方案1】:

感谢大家。对不起,我终于找到了。我使用的是 pyinstaller-3,而当前版本是 pyinstaller-5。现在一切正常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-10-24
    • 1970-01-01
    • 2019-10-23
    • 2019-10-23
    • 2011-12-10
    • 2015-11-15
    • 2015-08-07
    相关资源
    最近更新 更多