Python Forum
ModuleNotFoundError: No module named 'tkcalendar', Thonny, Windows 10
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModuleNotFoundError: No module named 'tkcalendar', Thonny, Windows 10
#1
I'm trying to learn to use the tkCalendar but getting a "ModuleNotFoundError: No module named 'tkcalendar'".
I have installed it properly I believe, using pip, but when I try to verify it entering >tkcalendar in the command prompt, the response is:

'tkcalendar' is not recognized as an internal or external command,
operable program or batch file.

I'm reading a lot of vague solutions for the environmental variable addition which doesn't match the Environment Variables windows I see in Win 10 Pro.
Everything else imaginable I have done with python and tkinter has worked perfectly without hesitation, until this.

Could the Environment Variable be the problem for this one module?

my test code is:

import tkinter as tk
import tkcalendar
from tkcalendar import Calendar

root = tk.Tk()
cal = Calendar(root, selectmode="day", date_pattern="yyyy-mm-dd")
cal.pack(pady=20)

def get_date():
    selected_date = cal.get_date()
    print("Selected Date:", selected_date)

button = tk.Button(root, text="Get Date", command=get_date)
button.pack(pady=10)

root.mainloop()
Reply
#2
Does it show up if you type pip list in the shell? Are you using a virtual environment?
Reply
#3
Not using a virtual environment.

pip list result:

C:\Users\Owner>pip list
Package Version
---------- -------
babel 2.17.0
pip 24.3.1
tkcalendar 1.6.1
Reply
#4
Depending on how you installed Thonny, it may be using its integrated Python interpreter. Try to install tkcalendar from Thonny's Tools menu.
« We can solve any problem by introducing an extra level of indirection »
Reply
#5
(Yesterday, 07:33 PM)Gribouillis Wrote: Depending on how you installed Thonny, it may be using its integrated Python interpreter. Try to install tkcalendar from Thonny's Tools menu.

Thanks Gribouillis!
That fixed it. Clap
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  No module named 'importlib.metadata' EdVS 3 918 Jan-30-2025, 09:55 AM
Last Post: Larz60+
  Python 3.13(Windows) does not have the latest module OS phillip_from_oz 1 797 Dec-13-2024, 04:35 AM
Last Post: deanhystad
  ModuleNotFoundError: No module named 'athena_read' raman 2 1,238 Jul-01-2024, 07:52 AM
Last Post: Gribouillis
  no module named 'docx' when importing docx MaartenRo 1 5,288 Dec-31-2023, 11:21 AM
Last Post: deanhystad
Question Sonar Code in Thonny for Pi Pico iansmiler 1 1,003 Nov-22-2023, 12:27 PM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 30,850 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 9,576 Oct-29-2023, 11:33 PM
Last Post: Serg
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 4,316 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 3,688 Aug-07-2023, 05:32 AM
Last Post: DPaul
  Rename files in a folder named using windows explorer hitoxman 3 1,817 Aug-02-2023, 04:08 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020