我使用 PyInstaller 創建了 .exe 文件。我的程序直接運行時沒有錯誤。但是當我嘗試從文件搜索運行它時,它返回“無法執行腳本”錯誤。這沒有道理,我不明白。我也看不到任何其他錯誤 - 無論是否控制臺模式 -二手進口:from PyQt5 import QtCore, QtGui, QtWidgetsfrom course_grabber import getCourseClasses,getCourseCodesimport randomfrom itertools import combinationsfrom profilim import Ui_Profilimfrom dersler import Ui_dersPlaniPencerefrom vt_islemleri import *from threading import Threadfrom webbrowser import open as tarayici_acimport concurrent.futuresimport datetimeimport gcimport sysimport sqlite3 as sqlfrom course import Course
1 回答

江戶川亂折騰
TA貢獻1851條經驗 獲得超5個贊
我找到了解決方案。我在代碼和 pyinstaller 中嘗試了很多東西。這是關于權限的。當我以管理員身份運行時它起作用了。如果沒有管理員權限,程序無法打開外部數據庫。
添加回答
舉報
0/150
提交
取消