Reputation: 45
I'm converting my script in python to be an executable using cx_Freeze, it works fine after installing it on my on laptop(32 bit windows 7). After copying the .msi file and install it on my friend's laptop(64 bit windows 10), it shows this error.
I think the error is on the part of my script where I used 'win32com.client'. How can I make my system work on other platform? I'm new to this kind of stuff so I hope anyone will be able help me.
EDITED:
Here's my setup.py script.
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
)
Upvotes: 1
Views: 2480
Reputation: 45
Solved the problem by including all the .dll
from the dist folder created by pyinstaller in my setup.py
. I don't know why the cx_Freeze didn't copy the .dll
files from win32com.client
but pyinstaller copied all of them.
Upvotes: 1