我试图在Windows 10上使用Pyinstaller创建一个独立的应用程序。但是当我尝试在Windows 8.1中执行它时,它不会运行(它在每台Windows 10计算机上都能正常运行)。是否可以指定兼容性或使应用程序通常可以通过各种Windows操作系统访问。
我在创建应用程序时使用了以下代码
pyinstaller -F -w --onefile file_name.py
我应该添加什么,或者python代码本身是否需要添加?
当我在编译期间放入--debug时,我得到以下弹出窗口:
[2252] PyInstaller Bootloader 3.x
[2252] Loader: executable is [FILE-PATH]
[2252] LOADER: homepath is [FILE-DIRECTORY]
[2252] LOADER: _MEIPASS2 is NULL
[2252] LOADER: archivename is [FILE_PATH]
[2252] LOADER: Extracting binaries
[2252] LOADER: Executing self as child
[2252] LOADER: set _MEIPASS2 to C:Users\..\AppData\Local\Temp\_MEI22522
[2252] LOADER: Setting up to run child
[2252] LOADER: Creating child process
[2252] LOADER: Waiting for child process to finish
[2252] LOADER: SetDllDirectory(C:\Users\..\AppData\Local\Temp\_MEI22522
[2792] LOADER: Already in the child - running user's code
[2792] LOADER: manifestpath: [FILE_TEMP_PATH].manifest
[2792] LOADER: Activation context created
[2792] LOADER: ACtivation context activated
[2792] LOADER: Python library: C:\Users\..\AppData\Local\Temp\_MEI22522\python27.dll
[2792] LOADER: Loaded functions from Python library
[2792] LOADER: Manipulating environment (sys.path, sys.prefix)
[2792] LOADER: sys.prefix is C:\Users\..\AppData\Local\Temp\_MEI22~1
[2792] LOADER: Setting runtime options
[2792] LOADER: Initializing python
[2792] LOADER: Overriding Python's sys.path
[2792] LOADER: Post -init sys,path is [PATH_TO_ _MEI22522]
[2792] LOADER: Setting sys.argv
[2792] LOADER: setting sys._MEIPASS
[2792] LOADER: importing modules from CArchive
[2792] LOADER: extracted struct
[2792] LOADER: callfunction returned
[2792] LOADER: extracted pyimod01_os_path
[2792] LOADER: callfunction returned
[2792] LOADER: extracted pyimod01_archive
[2792] LOADER: Installing PYZ archive with Python modules.
Failed to execute [FILE_NAME]
WebDriverWait(驱动程序,10000)。直到(EC.visibility_of_element_located((By.TAG_NAME, '主体')))