1
我将python中的脚本转换为使用cx_Freeze的可执行文件,它在我的笔记本电脑(32位Windows 7)上安装后可以正常工作。复制.msi文件并将其安装到我的朋友的笔记本电脑(64位窗口10)后,它显示此错误。python-cx_Freeze在64位操作系统上显示错误
我认为这个错误发生在我用'win32com.client'脚本的部分。 如何让我的系统在其他平台上工作?我是新来的这种东西,所以我希望任何人都能帮助我。
编辑:
这里是我的setup.py脚本。
from cx_Freeze import setup, Executable
import sys
import os
os.environ['TCL_LIBRARY'] = r'C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Users\Admin\AppData\Local\Programs\Python\Python35-32\tcl\tk8.6'
base = None
if sys.platform == 'win32':
base = "Win32GUI"
if sys.platform == 'win64':
base = "Win64GUI"
executables = [Executable("nafd.py", base=base,shortcutName="Nafd Encoding System",shortcutDir="ProgramMenuFolder", icon = "ntc96.ico")]
setup(
name = "Nafd32",
options = {"build_exe":{"packages": ["time","win32com.client","tkinter","openpyxl","functools","os","datetime","re","requests","io","math"],"include_files":["newlistofcity.txt","newlistofbrgy.txt","newlistofbrgycode.txt","ntc96.ico","tcl86t.dll", "tk86t.dll"]}},
version = "2.1.5",
description = "Network and Facilities Division Encoding System",
executables = executables
)
我尝试在脚本中使用pyinstaller。它在我朋友的笔记本电脑上工作。我认为cx_freeze没有包含win32com.client中的.dll文件。 – Usagi