I have a tkinter app that utilises the tkcalendar package
import tkinter as tk
from tkcalendar import DateEntry
from datetime import datetime
def main() -> None:
root = tk.Tk()
root.title('Test calendar')
event_date = datetime.now()
date_picker = DateEntry(root,
date_pattern='dd/mm/yyyy',
year=event_date.year,
month=event_date.month,
day=event_date.day)
date_picker.grid(row=0, column=0)
root.mainloop()
if __name__ == '__main__':
main()
It works correctly when I call main.py, but not as a zipapp.
I have install tkcalendar in my build directory
python -m pip install tkcalendar --target build
and built the pyz file
python -m zipapp build --main main:main --output dist/main.pyz
But if I run the pyz file, I get an error
NotADirectoryError: [Errno 20] Not a directory: ‘…/dist/main.pyz/babel/locale-data’
How can I fix this?