Python Forum
Why does pyinstaller register success with py to exe, but?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why does pyinstaller register success with py to exe, but?
#1
Here is the information for after the successful py to exe using pyinstaller for a windows gui, but the windows gui still fails to launch in Windows 10. Why is this not working? Is my spec file complete? Please help, I'm sure my other people would love to know the answer and resolution. The gui uses tkinter modules and so do I have to pack the python idle with the spec as well? Furthermore the NSA12.py code works flawlessly from the Python 3.6.5 idle and exits properly without errors. I'm really confused!

Quote: 6812 INFO: PyInstaller: 3.3.1
6812 INFO: Python: 3.6.5
6828 INFO: Platform: Windows-10-10.0.16299-SP0
6843 INFO: UPX is not available.
6890 INFO: Extending PYTHONPATH with paths
['C:\\Users\\tomeo', 'C:\\users\\tomeo\\nsa12']
6906 INFO: checking Analysis
7905 INFO: Appending 'binaries' from .spec
8108 INFO: checking PYZ
8280 INFO: checking PKG
8389 INFO: Building because toc changed
8389 INFO: Building PKG (CArchive) out00-PKG.pkg
32790 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
32921 INFO: Bootloader
c:\users\tomeo\appdata\local\programs\python\python36\lib\site-
packages\PyInstaller\bootloader\Windows-64bit\runw.exe
32921 INFO: checking EXE
33030 INFO: Building because toc changed
33030 INFO: Building EXE from out00-EXE.toc
33427 INFO: SRCPATH [('grand.ico', None)]
33427 INFO: Updating icons from ['grand.ico'] to
C:\Users\tomeo\AppData\Local\Temp\tmp5ch96ems
33536 INFO: Writing RT_GROUP_ICON 0 resource with 76 bytes
33536 INFO: Writing RT_ICON 1 resource with 1128 bytes
33536 INFO: Writing RT_ICON 2 resource with 2440 bytes
33536 INFO: Writing RT_ICON 3 resource with 4264 bytes
33536 INFO: Writing RT_ICON 4 resource with 9640 bytes
33552 INFO: Writing RT_ICON 5 resource with 5664 bytes
33740 INFO: Appending archive to EXE C:\Users\tomeo\dist\nsa12.exe
35015 INFO: Building EXE from out00-EXE.toc completed successfully.
So that installed ok, but the NSA12.exe, gui is not running. My other question is do I have to pack more files into the spec to make it work? Here is my spec!

# -*- mode: python -*-

 block_cipher = None


 a = Analysis(['nsa12.py'],
         pathex=['C:\\users\\tomeo\\nsa12'],
         binaries=[(r'C:\Program Files (x86)\Windows 
 Kits\10\Redist\ucrt\DLLs\x86','.')] ,
         datas=[],
         hiddenimports=[],
         hookspath=[],
         runtime_hooks=[],
         excludes=[],
         win_no_prefer_redirects=False,
         win_private_assemblies=False,
         cipher=block_cipher)
  pyz = PYZ(a.pure, a.zipped_data,
         cipher=block_cipher)
  exe = EXE(pyz,
      a.scripts,
      a.binaries,
      a.zipfiles,
      a.datas,
      name='nsa12',
      debug=False,
      strip=False,
      upx=True,
      runtime_tmpdir=None,
      console=False , icon='grand.ico')
This Question is currently at stackoverflow, but no answers yet.
Pyinstaller exe to gui on windows?

For anyone interested in my program this is it! It works fine in the Python idle 3.6.5, but I wish it were a standalone windows exe that could run on any windows machine as a gui!

#!python3.6.5


from tkinter import *
from tkinter import Frame, Label, Entry, messagebox

import tkinter as tk
import tkinter
import tkinter.messagebox

#print ("sys.executable")
win = tk.Tk()
 
win.title("Prime Hunter Seeker 1.001, [email protected]")
win.geometry("1400x1200")
win.configure(bg="#16161d")
label1 = Label(text="Enter 1st number or use this for all Prime Numbers with the 3 outputs:")
label1.pack()
 
entry1 = Entry()
entry1.pack()

 
label2 = Label(text="Enter 2nd number:")
label2.pack()
entry2 = Entry(win)
entry2.pack()
 


def mod1():
    x = int(entry1.get())
    x= int(entry1.get())
    tkinter.messagebox.showinfo("Result", x%101 +(x%6^x%12))
    

def mod2():
    x = int(entry1.get())
    x= int(entry1.get())
    tkinter.messagebox.showinfo("Result", x%7)
    

def mod3():
    x = int(entry1.get())
    x= int(entry1.get())
    tkinter.messagebox.showinfo("Result", x%4)

def mod8():
    x = int(entry1.get())
    x= int(entry1.get())
    tkinter.messagebox.showinfo("Result", x%101 +(x%6^x%12))
    b = int(entry1.get())
    b= int(entry1.get())
    tkinter.messagebox.showinfo("Result", b%7)
    c = int(entry1.get())
    c= int(entry1.get())
    tkinter.messagebox.showinfo("Result", c%4)
    
def sub():
    x = float(entry1.get())
    y = float(entry2.get())
    tkinter.messagebox.showinfo("Result", x-y)
 
def mult():
    x = float(entry1.get())
    y = float(entry2.get())
    tkinter.messagebox.showinfo("Result", x*y)
 
def add():
    x = float(entry1.get())
    y = float(entry2.get())
    tkinter.messagebox.showinfo("Result", x+y)

def divide():
    x = float(entry1.get())
    y = float(entry2.get())
    tkinter.messagebox.showinfo("Result", x/y)

def mod():
    x = float(entry1.get())
    y = float(entry2.get())
    tkinter.messagebox.showinfo("Result", x%y)

button1 = Button(win, bg="red", text="Output1, Mprime mod Checker, x%101 +(x%6^x%12)", command=mod1)
button1.pack()

button2 = Button(win, bg="red", text="Output2, Mprime mod Checker, x%7", command=mod2)
button2.pack()

button3 = Button(win, bg="red", text="Output3, Mprime mod Checker, x%4", command=mod3)
button3.pack()

button4 = Button(win, bg="yellow", text="Subtraction", command=sub)
button4.pack()
 
button5 = Button(win, bg="yellow", text="Multiplication", command=mult)
button5.pack()
 
button5 = Button(win, bg="yellow", text="Addition", command=add)
button5.pack()

button6 = Button(win, bg="yellow", text="Division", command=divide)
button6.pack()

button7 = Button(win, bg="blue", text="Normal Mod", command=mod)
button7.pack()

button8 = Button(win, bg="red", text="ALL Outputs 1.2.3, Mprime mod Checker,x%101 +(x%6^x%12), b%7 c%4", command=mod8)
button8.pack()

button9 = Button(win, bg="yellow", text='''#Mprime hunter Seeker 2^p-1 |version 1.001| May 3, 2018: 
#Properties:
#If the middle and last output is 1 then its an Mprime, see (Clause F)
#b)If the middle output is 2, then 1 can be in the bottom output for Mprime.
#If the top output is Mprime then Mprime
#If the top output is zero no Mprime
#If the middle output is even besides 2 then top has to be prime and bottom has to be 1
#If the middle output is an Mprime then the bottom has to be 1 for it to be Mprime
#If the middle output is 1 and bottom Mprime (see Clause 3) then mprime
#Prime (37) is an anomaly other than its 3 outputs is equal to a digital root of 4
#(Clause 3)If the middle output is 1 and bottom 3 and top output equals a 4 in digital root then may not be Mprime
#MPrime (77232917 ) I have a feelings needs to be checked over again
#(Clause F)If you use prime numbers under 101 and  1 and 1 in the middle and bottom outputs then the top output has to be Mprime to be Mprime''')
button9.pack()

def y():
    y = x%101 +(x%6^x%12)
def fmod():

    def _quit():
        win.quit()
        win.destroy()
    
def _quit():
    win.quit()
    win.destroy()

     

win.title("Mprime Hunter Seeker |Version 1.000| May 4, 2018 Software.inc [email protected]")
 
menuBar = Menu(win)
win.config(menu=menuBar)
 
fileMenu = Menu(menuBar, tearoff=False)
fileMenu.add_command(label="New")
fileMenu.add_separator()
fileMenu.add_command(label="Exit", command=_quit)
menuBar.add_cascade(label="File", menu=fileMenu)
 
helpMenu = Menu(menuBar)
helpMenu.add_command(label="About")
menuBar.add_cascade(label="Help", menu=helpMenu)
def configure():

    def onAbout(self):
        new_root = Tk()
        new_root.geometry("630x400+200+200")
        About(root)

    

    

    win.mainloop()
Reply
#2
Well I'm a little further with a upx update however still errors. Here is a download link for the upx.
UPX

[Image: vcruntime-error-python36_dll-fatal-error...taller.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pymodbus Write value to register stsxbel 10 8,138 Aug-18-2022, 01:42 PM
Last Post: DeaD_EyE
  Simple syntax to asynchronously get access to MODBUS register orion67 1 2,841 Jan-22-2022, 12:40 PM
Last Post: orion67
  Login and Register system finndude 1 2,393 Apr-24-2020, 10:05 PM
Last Post: deanhystad
  AttributeError: 'Register' object has no attribute 'bit_7' colt 1 1,990 Dec-12-2019, 09:39 PM
Last Post: micseydel
  Identifying string success flag graham23s 4 3,103 Aug-14-2019, 09:27 PM
Last Post: graham23s
  How to implement class register? AlekseyPython 0 1,987 Feb-14-2019, 06:19 AM
Last Post: AlekseyPython
  simple register code aocii 2 2,627 Dec-22-2018, 11:15 AM
Last Post: aocii
  Python script runs on startup but does not register keystrokes. mericanpi 3 3,428 Sep-07-2018, 02:58 PM
Last Post: mericanpi
  No success with PyInstaller j.crater 2 7,057 Mar-10-2018, 10:29 PM
Last Post: j.crater
  Help with code/URGENT/Adding position to register list Laxman 3 3,695 Apr-23-2017, 04:48 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

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