PyQt5 fbs无法执行

2024-09-28 03:25:29 发布

您现在位置:Python中文网/ 问答频道 /正文

slack肯定有问题,在fbs freeze之后,我无法运行独立的.exe文件。你知道吗

这太奇怪了,因为所有其他进口商品都没有问题。例如,这个简单的代码甚至不适用于slack

from fbs_runtime.application_context.PyQt5 import ApplicationContext
from PyQt5.QtWidgets import QMainWindow

import slack
import sys

if __name__ == '__main__':
    appctxt = ApplicationContext()       # 1. Instantiate ApplicationContext
    window = QMainWindow()
    window.resize(250, 150)
    window.show()
    exit_code = appctxt.app.exec_()      # 2. Invoke appctxt.app.exec_()
    sys.exit(exit_code)

复制步骤:

pip install fbs PyQt5==5.9.2

pip install slackclient

fbs startproject

fbs run<;--这可以工作(可以打开窗口)

fbs freeze<;--这很有效,没有错误

然后从~/target/name/name.exe点击可执行文件,它甚至不会启动。你知道吗

谁都能猜出问题出在哪里?你知道吗

Windows 10 Pro
Visual Studio Code
Python 3.6.8 64-bit

Tags: namefromimportsysexitcodewindowslack
1条回答
网友
1楼 · 发布于 2024-09-28 03:25:29

我…金解决了这个问题。你知道吗

它甚至与pyinstallerfbs都没有关系。你知道吗

我检查了库中安装的每个依赖项。原来,multidict(4.7.1)的最新版本崩溃了,slack-client降级到4.6.1解决了问题。 这太疯狂了。你知道吗

相关问题 更多 >

    热门问题