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:
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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() |