I have a Console type Python3 program [.py] which when executed [exe file after compiling] gives missing msvcr100.dll
error in some machines [friends or relatives etc.] to which I need to download that dll file [google search and download it] and copy it to system32
folder myself.
Hence, after googling I found that cx_Freeze
has an option called "include_msvcr"
in the build_exe
which might help me solve this issue but the documentation was not to my standard and I couldn't understand how to do that.
Here is my setup_console.py
code:
import sys
from cx_Freeze import setup, Executable
base=None
if sys.platform=='win32':
base="Win32GUI"
setup( name="Rescue Unit",
version="2.0",
executables=[Executable("resunitv2.py",base)])
I tried adding the include_msvcr
line after the base
argument in Executable
but it gave a include_msvcr not defined
error.
Btw. I use this GUI compiling code as I do not want a console window to appear as long as the program is running [hate it] Can anyone show me how to do it [with an example code perhaps]
[cx_Freeze version is 4.3.3, Python version is 3.5, Windows 7 SP1 x64]
Thanks for all the help everyone but I figured it out myself. The include_msvcr
option is to be added in the setup.py file as follows:
import sys
from cx_Freeze import setup, Executable
build_exe_options = {
"include_msvcr": True #skip error msvcr100.dll missing
}
base=None
if sys.platform=='win32':
base="WIN32GUI"
setup( name = "AppName",
version = "1.0",
description = "blah blah",
options = {"build_exe": build_exe_options},
executables = [Executable("appname.py", base=base)])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With