ModuleNotFoundError: No module named ‘babel.numbers’

Traceback (most recent call last):
File "tkinter/__init__.py", line 1705, in __call__
File "script.py", line 726, in
File "script.py", line 536, in calendar
File "tkcalendar/calendar_.py", line 211, in __init__
File "babel/dates.py", line 314, in get_day_names
File "babel/core.py", line 641, in days
File "babel/core.py", line 364, in _data
File "babel/localedata.py", line 111, in load
File "babel/localedata.py", line 111, in load
File "babel/localedata.py", line 117, in load
ModuleNotFoundError: No module named 'babel.numbers'

Solution Explained

Locate the tkcalendar folder under venv/lib/python3.x/site-packages of your project folder.

Under calendar.py, add an additional import for the missing module.

import calendar
from babel.dates import format_date, parse_date, get_day_names, get_month_names
from babel.numbers import *  # Additional Import

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s