How can I generate the exe application from python file

Question:

I’m trying to get the .exe file from this script using pyinstaller

I used this command pyinstaller -w -F test.py while I’m in the test directory

the file test.py contains

from tkinter import *
from tkcalendar import DateEntry

root = Tk()
date = DateEntry(root, year=2001, month=11, day=11, width=17,)
date.pack()
root.mainloop()

The .exe file that I get is not WORKING?

when I do this pyinstaller -F test.py I get the error of no module named babel.numbers on the console

Asked By: Ali

||

Answers:

It seems that PyInstaller can’t resolve module babel.numbers for tkcalendar. One easy way is to use hidden-import:

pyinstaller -F --hidden-import "babel.numbers" test.py
Answered By: Masoud Rahimi
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.