Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7724163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:37:23+00:00 2026-06-01T04:37:23+00:00

I begin in GUI with Tkinter with Python. I’m trying to create a graphical

  • 0

I begin in GUI with Tkinter with Python.
I’m trying to create a graphical interface for a game.
When I tried to run this program:

    import Tkinter as tk
    import ttk

    def create_frame(parent, col, r, st):
        frame = ttk.Frame(parent, padding="3 3 12 12")
        frame.grid(column=col, row=r, sticky=st)
        frame.columnconfigure(0, weight=1)
        frame.rowconfigure(0, weight=1)
        return frame
    def create_frame(parent, col, r, st):
        frame = ttk.Frame(parent, padding="3 3 12 12")
        frame.grid(column=col, row=r, sticky=st)
        frame.columnconfigure(0, weight=1)
        frame.rowconfigure(0, weight=1)       
        return frame
    def create_entry(parent, col, r, st, w):
        val = tk.StringVar()
        entry = ttk.Entry(parent, width=w, textvariable=val)
        entry.grid(column=col, row=r, sticky=st)
        return val, entry
    def create_label(parent, col, r, st, text = None):
        if text == None:
            val = tk.StringVar()
            label = ttk.Label(parent, textvariable = val)
        else:
            label = ttk.Label(parent, text = text)
            val = None
        label.grid(column = col, row = r, sticky = st)
        return val
    def create_button(parent, col, r, st, com, text):
        button = ttk.Button(parent, text = text, command = com)
        button.grid(column = col, row = r, sticky = st)
    def create_main_window():
        root = tk.Tk()
        root.title("Scrabble")
        main_frame = create_frame(root, col = 0, r = 0, st = (tk.N, tk.W,     tk.E, tk.S))
        feet_val, feet_entry = create_entry(main_frame, col = 2, r = 1, st =     (tk.W, tk.E), w = 7)
        meters = create_label(main_frame, col = 2, r = 2, st = (tk.W, tk.E))
        create_label(main_frame, text = "feet", col = 3, r = 1, st = tk.W)
        create_label(main_frame, text = "is equivalent to", col = 1, r = 2,     st = tk.E)
        create_label(main_frame, text = "meters", col = 3, r = 2, st = tk.W)
        for child in main_frame.winfo_children():
            child.grid_configure(padx=5, pady=5)

        feet_entry.focus()
        root.mainloop()

    create_main_window()

But I receive this ERROR message :

  File "Scrabble.py", line 175, in <module>
    create_main_window()
  File "Scrabble.py", line 160, in create_main_window
    main_frame = create_frame(root, col = 0, r = 0, st = (tk.N, tk.W, tk.E,     tk.S))
  File "Scrabble.py", line 131, in create_frame
    frame = ttk.Frame(parent, padding="3 3 12 12")
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-    tk/ttk.py", line 761, in __init__
    Widget.__init__(self, master, "ttk::frame", kw)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-    tk/ttk.py", line 559, in __init__
    _load_tile(master)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-    tk/ttk.py", line 47, in _load_tile
    master.tk.eval('package require tile') # TclError may be raised here
_tkinter.TclError: can't find package tile

What should I do ?
Do you have any advice to give me as a begin with Tkinter ?
Thank you in advance.
MFF

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:37:24+00:00Added an answer on June 1, 2026 at 4:37 am

    Based on the paths shown, you appear to be using a python.org Python 2.7 on OS X. Depending on which version of OS X you are running and which Python installer you used, the Tcl/Tk version may not include ttk or tile, its predecessor. If you are using the 64-/32-bit Python 2.7 (the version line will say GCC 4.2.1), try installing ActiveState Tcl/Tk 8.5 from here. If using the python.org 32-bit-only installer (GCC 4.0.1), install ActiveState Tcl/Tk 8.4. There is more information about Mac OS X Python installers and Tcl/Tk versions here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run a GUI unit test with DUnit to an application whose
This code in a GUI application compiles and runs: procedure TForm1.Button1Click(Sender: TObject); begin Self
I used this tutorial http://delphi.about.com/od/kbthread/a/thread-gui.htm to create a class that asynchronously downloads a file
I am trying to create a GUI to display information read from a file.
To begin with, I don't know the first thing about Python ... so I
I have an existing app with a command-line interface that I'm adding a GUI
In my Java course I have to create a GUI class that interacts with
I have a dunit test project and I am trying to run it in
Here is my issue: I'm making a game GUI API. It has a mouse
I'm having problem (basically, I'm confused.) while trying to create a worker thread for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.