优化了部分包导入

This commit is contained in:
2025-05-14 22:12:45 +08:00
parent aaac28c8b9
commit ff3f84c074
2 changed files with 4 additions and 5 deletions

6
run.py
View File

@ -1,8 +1,8 @@
from logging import getLogger, NOTSET, FileHandler, Formatter, StreamHandler, info
from os import environ
from pathlib import Path
from sys import argv
from time import strftime, localtime, time
import os
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QApplication
from func.Module_mainwindow import MainWindow
@ -32,10 +32,10 @@ if __name__ == '__main__':
if spec and spec.origin:
dirname = Path(spec.origin).parent
plugin_path = dirname / 'plugins' / 'platforms'
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path.__str__()
environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path.__str__()
# 解决 Error #15: Initializing libiomp5md.dll
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
app = QApplication(argv)