Home > Net >  there any way to make my app run after convert it from python script to desktop app
there any way to make my app run after convert it from python script to desktop app

Time:08-15

I make gui game with python and when I convert it - using pyinstaller package - from python script to descktop app isn't work I click double click and nothing happen how can I slove this problem ?

This code also rise the same problem:

from tkinter import *
root = Tk ()
root.config (bg="black ")
#=========================
Label  (root , text = "Hi" ,bg= "blue" , fg ="green")
#=========================
root.mainloop()

when I convert this code the same problem happen.

CodePudding user response:

This worked fine for me: steps I took

OS: Windows | Terminal: Git

  1. mkdir folder
  2. cd folder
  3. python -m venv venv
  4. venv\Scripts\activate
  5. python -m pip install --upgrade pip pyinstaller
  6. open new file app.py and paste your example into file
  7. pyinstaller -F --noconsole app.py
  8. cd dist
  9. app.exe <--- opens the window and all works fine
  • Related