优化了部分包导入
This commit is contained in:
6
run.py
6
run.py
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user