Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-27-2008, 09:28 PM   #1
LQ Newbie
Registered: Apr 2008
Posts: 13

Rep: Reputation: 0
How do I import Tkinter into Python

I am a total n00b, but I am vastly interested in Python. I have what I believe is version 2.3 running on my Jornada 720 which is running matchbox and icewm (schweeeeeeeet!) and got a game programming book to finally realize my dream of creating a streetfighter game but with homeless vagrants. I get to the part where it says to type:

from Tkinter import*

and I get an error that tKinter is not a recognized module, which is weird because this game book says it is native to 2.3. I tried to download 2.5.2 and got a tar file, and tried running it with:

tar -xvf python2.5.5.tar

and am getting "invalid tar magic"...

I just want tKinter, how would I go about re-enabling or reinstalling this?
Old 06-27-2008, 09:34 PM   #2
LQ Newbie
Registered: Jun 2006
Distribution: Red Hat, Solaris, FreeBSD
Posts: 20

Rep: Reputation: 0

You don't say want distro you are using, but usually this is installed as a seperate package. If you are using a Red Hat based distro such as Fedora or CentOS you should be able to install the tkinter package to get the functionality that you are looking for.


for additional information.
Old 06-27-2008, 11:24 PM   #3
LQ Newbie
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I am using a GPE Matchbox distro, ... I am trying to run this on a Jornada 720, the palmtop pc... I wrote the guy who made the distro, he said he installed the full version, but I cannot get tkinter to work, and rpm does not work either... I would use ipkg, which is working to install other programs, but for some reason when I run ipkg update, which I assume would put tkinter in python, nothing happens, I get some text about an updated list and thats all...
Old 06-28-2008, 05:22 AM   #4
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,756

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
Tkinter is Python's de-facto standard GUI (Graphical User Interface) package. It is a thin object-oriented layer on top of Tcl/Tk.
Tkinter is not the only GuiProgramming toolkit for Python. It is however the most commonly used one...
The Tkinter wiki:

Besides 'tkinter' you will also need 'tcl' and 'tk' AFAIK.


Last edited by knudfl; 06-28-2008 at 05:24 AM.
Old 07-01-2008, 05:40 AM   #5
tur third
Registered: Jun 2005
Location: Surrey, UK
Distribution: Ubuntu 10.04, 10.10
Posts: 187

Rep: Reputation: 24
Are you aware of pygame? If you want to write a game, that is what you need - it has a module for handling sprites etc. There is a good chance you will not have any reason to use tkinter.
Old 07-02-2008, 09:47 AM   #6
LQ Newbie
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I have IceWM on a Jornada, and a very basic (read: almost mentally handicapped) knowledge of Linux. I tried yum and RPM, neither of which work. I am not sure how to get TCL or TK installed onto this thing, is there a way to get either those or this newfangled pygame using ipkg? I have gotten that to work... I am trying to be more help (I know this is a custom distribution) and I do have matchbox on here too, which seems to be more helpful, if that would work...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
tkinter integration to python 2.3.4 gaddargarson Programming 1 03-09-2005 05:58 AM
Python and Tkinter 1337 Twinkie Fedora 2 08-03-2004 12:35 PM
Python: Tkinter. Chu Programming 0 11-10-2003 02:56 AM
Python and Tkinter Error Gerardoj Programming 1 11-08-2003 10:52 PM
importing trouble....python...regarding Tkinter maseby Programming 0 11-03-2003 02:54 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration