小编inf*_*try的帖子

如何重新编译Pyinstaller的bootloader

我有一个exe使用 PyInstaller 生成的文件的 AntiVirus 误报问题,通过搜索,我发现这个答案包含重新编译引导加载程序,但我无法完成。这是我到目前为止尝试过的:

  1. 由于某些原因安装失败,尝试使用“choco install -y vcbuildtools”安装带有choco的C++构建工具。
  2. 这里安装visual studio社区然后转到“cd bootloader”并python ./waf distclean all得到错误can't open file './waf': [Errno 2] No such file or directory
  3. 安装 MinGW-w64 并设置路径然后重试,我遇到了同样的错误。

或者也许有另一种方法可以使可执行文件不被检测为病毒/木马。

使用的软件包:PyQt5、pysnmp、pandas、numpy。

编辑: 感谢@Ana Knickerbocker 的回答,我能够取得进展,现在当我运行时python ./waf all出现错误: Python Version : 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] Checking for 'msvc' (C compiler) : not found Checking for 'gcc' (C compiler) : not found Checking for 'clang' …

python antivirus virus pyinstaller false-positive

12
推荐指数
1
解决办法
8838
查看次数

Qthread 上的 QTimer

我有一个 GUI,我需要使用 Qtimer 不断更新,因为我使用工作 Qthread,这是我的代码:

from PyQt5.QtWidgets import QApplication, QPushButton, QWidget
from PyQt5.QtCore import QThread, QTimer
import sys
import threading


class WorkerThread(QThread):
    def run(self):
        print("thread started from :" + str(threading.get_ident()))
        timer = QTimer(self)
        timer.timeout.connect(self.work)
        timer.start(5000)
        self.exec_()

    def work(self):
        print("working from :" + str(threading.get_ident()))
        QThread.sleep(5)


class MyGui(QWidget):

    worker = WorkerThread()

    def __init__(self):
        super().__init__()
        self.initUi()
        print("Starting worker from :" + str(threading.get_ident()))
        self.worker.start()

    def initUi(self):
        self.setGeometry(500, 500, 300, 300)
        self.pb = QPushButton("Button", self)
        self.pb.move(50, 50)
        self.show()


app = QApplication(sys.argv)
gui = MyGui()
app.exec_() …
Run Code Online (Sandbox Code Playgroud)

python pyqt qthread qtimer pyqt5

3
推荐指数
1
解决办法
6916
查看次数

标签 统计

python ×2

antivirus ×1

false-positive ×1

pyinstaller ×1

pyqt ×1

pyqt5 ×1

qthread ×1

qtimer ×1

virus ×1