Python Forum
Executable won't run on another PC
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Executable won't run on another PC
#1
Hi guys,
I need your help here :)
After I've written a simple webpage opening program (also opens a local external exe) I have converted the .py file to an exe one via cx_freeze.
(python version 3.3.5)
On my laptop the exe can be run without any problems (it works perfectly), however after testing in on another laptop (same Win7 64 bites) it isn't reacting at all - it isn't running to an error, neither starting.

The setup code can be found below:


import sys
from cx_Freeze import setup, Executable
setup( name = "whatever", version = "0.1 beta", description = "2017 All Rights Reserved ", executables = [
Executable("PIU.py", base = "Win32GUI", icon="favicon.ico")])

In case you need some more info, please let me know.

I really hope that someone will be able to help to resolve this issue.

Thank you in advance!
Reply
#2
An update that may help. After installing PyQt on the second laptop the exe worked without problems.
How is the GUI related to this?
Reply
#3
I believe you have to add any 3rd party library into the setup for it to be embedded into the exe, instead of using the system installed one

something like
from cx_Freeze import setup, Executable
includes = ["atexit", "PyQt4.QtCore"] 
exe = Executable(
    script = "example.pyw",
    base = "Win32GUI"
    )
 
setup(
    options = {"build_exe": {"includes": includes}},
    executables = [exe]
    )
Recommended Tutorials:
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020