Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Python by (19.9k points)

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

1 Answer

0 votes
by (25.1k points)

This is because pyInstaller can't resolve module babel.numbers for tkcalendar. You can solve this issue by using a hidden import like this:

pyinstaller -F --hidden-import "babel.numbers" test.py

Related questions

0 votes
1 answer
asked Feb 6, 2021 in Python by laddulakshana (16.4k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...