I want to turn a python program into a windows 10 or 7 app that can run on windows PCs without python installed. I use python 3.7.
I don't think this matters but just in case, here's my code:
from tkinter.messagebox import showwarning
from tkinter import *
import schedule
from win10toast import ToastNotifier
toaster = ToastNotifier()
root = Tk()
root.withdraw()
def shownotification():
toaster.show_toast("Screen Time",
"Take a break for 20 seconds",
duration=5)
schedule.every(20).minutes.do(shownotification)
while True:
schedule.run_pending()
You will need pyinstaller and pip
here is a link on how to download pip: https://pip.pypa.io/en/stable/installing/
open up your terminal and go to the same directory where your python file is.
after that go ahead and type pyinstaller filename.py
you can try other commands that can make your app an icon and others in this video: