473,842 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help on Tkinter installation

I want to do a little Tkinter in my 1 credit
python practicum, but I am having problems
getting everything installed correctly.
A sample of the problem is below:
------------------- The python source, test.py ------------------
from graphics import *

def main():
win = GraphWin("My Circle", 100, 100)
c = Circle(Point(50 ,50), 10)
c.draw(win)

main()

----------- result of $python test.py --------------------------

Traceback (most recent call last):
File "test.py", line 1, in ?
from graphics import *
File "/home/slimick/cs198/graphics.py", line 85, in ?
import Tkinter
File "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

------------result of $locate _tkinter ------------------------------

/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp.exp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Modules/_dummy_tkinter. c
/usr/src/redhat/SOURCES/Python-2.3.2/Modules/_tkinter.c
/usr/src/redhat/SOURCES/Python-2.3.2/PC/os2vacpp/_tkinter.def
/usr/src/redhat/SOURCES/Python-2.3.2/PCbuild/_tkinter.dsp

--------------------------------------------------------------------

I would appreciate any help on this.

And, thanks in advance

john slimick
slimick@pitt,ed u
university of pittsburgh at bradford
Jul 18 '05 #1
7 3158
In article <sl************ ********@venang o.upb.pitt.edu> ,
John Slimick <sl*****@pitt.e du> wrote:
I want to do a little Tkinter in my 1 credit
python practicum, but I am having problems
getting everything installed correctly.
A sample of the problem is below:
------------------- The python source, test.py ------------------
from graphics import *

def main():
win = GraphWin("My Circle", 100, 100)
c = Circle(Point(50 ,50), 10)
c.draw(win)

main()

----------- result of $python test.py --------------------------

Traceback (most recent call last):
File "test.py", line 1, in ?
from graphics import *
File "/home/slimick/cs198/graphics.py", line 85, in ?
import Tkinter
File "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

------------result of $locate _tkinter ------------------------------

/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp.exp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Modules/_dummy_tkinter. c
/usr/src/redhat/SOURCES/Python-2.3.2/Modules/_tkinter.c
/usr/src/redhat/SOURCES/Python-2.3.2/PC/os2vacpp/_tkinter.def
/usr/src/redhat/SOURCES/Python-2.3.2/PCbuild/_tkinter.dsp

Jul 18 '05 #2
On Thu, Mar 18, 2004 at 12:04:53AM -0000, Cameron Laird wrote:
I'm curious about how you decided to start with the program you've
exhibited above.


I think he's using this module:
http://mcsp.wartburg.edu/zelle/python/graphics.py
it looks like a canvas-based thing, and the example would probably have
worked if Tkinter was installed properly on the system.

Jeff

Jul 18 '05 #3
John Slimick wrote:
I want to do a little Tkinter in my 1 credit
python practicum, but I am having problems
getting everything installed correctly.
A sample of the problem is below:
------------------- The python source, test.py ------------------
from graphics import *

def main():
win = GraphWin("My Circle", 100, 100)
c = Circle(Point(50 ,50), 10)
c.draw(win)

main()

----------- result of $python test.py --------------------------

Traceback (most recent call last):
File "test.py", line 1, in ?
from graphics import *
File "/home/slimick/cs198/graphics.py", line 85, in ?
import Tkinter
File "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

------------result of $locate _tkinter ------------------------------

/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp.exp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Modules/_dummy_tkinter. c
/usr/src/redhat/SOURCES/Python-2.3.2/Modules/_tkinter.c
/usr/src/redhat/SOURCES/Python-2.3.2/PC/os2vacpp/_tkinter.def
/usr/src/redhat/SOURCES/Python-2.3.2/PCbuild/_tkinter.dsp

--------------------------------------------------------------------

I would appreciate any help on this.

And, thanks in advance

john slimick
slimick@pitt,ed u
university of pittsburgh at bradford


john,
Go here:
http://mail.python.org/pipermail/pyt...er/181603.html
wes

Jul 18 '05 #4
Well, thanks to some email and a fair amount of
time with Mr Google, I found that I needed to
update the Setup file.

(Platform: RH 8.0)

Prior to this I installed ActiveTCL8.4 .

So I made what I thought were the appropriate
changes to the "tkinter" section of Setup, I went up
a level (to /usr/src/redhat/SOURCES/Python-2.3.2),
did a "make" and this is what I got:

file libtk8.4.so does not exist

Well, when I do a locate, I find libtk8.4.so
in

/usr/local/ActionTcl/lib/libtk8.4.so

So I am caught with some kind of path problem.

Any ideas or suggestions?

(And thanks to all the respondents so far)

john slimick
sl*****@pitt.ed u

=============== =============== =============== ===============
John Slimick wrote:
I want to do a little Tkinter in my 1 credit
python practicum, but I am having problems
getting everything installed correctly.
A sample of the problem is below:
------------------- The python source, test.py ------------------
from graphics import *

def main():
win = GraphWin("My Circle", 100, 100)
c = Circle(Point(50 ,50), 10)
c.draw(win)

main()

----------- result of $python test.py --------------------------

Traceback (most recent call last):
File "test.py", line 1, in ?
from graphics import *
File "/home/slimick/cs198/graphics.py", line 85, in ?
import Tkinter
File "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

------------result of $locate _tkinter ------------------------------

/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp.exp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Modules/_dummy_tkinter. c
/usr/src/redhat/SOURCES/Python-2.3.2/Modules/_tkinter.c
/usr/src/redhat/SOURCES/Python-2.3.2/PC/os2vacpp/_tkinter.def
/usr/src/redhat/SOURCES/Python-2.3.2/PCbuild/_tkinter.dsp

--------------------------------------------------------------------

I would appreciate any help on this.

And, thanks in advance

john slimick
slimick@pitt,ed u
university of pittsburgh at bradford


john,
Go here:
http://mail.python.org/pipermail/pyt...er/181603.html
wes

Jul 18 '05 #5
John Slimick wrote:
Well, thanks to some email and a fair amount of
time with Mr Google, I found that I needed to
update the Setup file.

(Platform: RH 8.0)

Prior to this I installed ActiveTCL8.4 .

So I made what I thought were the appropriate
changes to the "tkinter" section of Setup, I went up
a level (to /usr/src/redhat/SOURCES/Python-2.3.2),
did a "make" and this is what I got:

file libtk8.4.so does not exist

Well, when I do a locate, I find libtk8.4.so
in

/usr/local/ActionTcl/lib/libtk8.4.so

So I am caught with some kind of path problem.

Any ideas or suggestions?

(And thanks to all the respondents so far)

john slimick
sl*****@pitt.ed u

=============== =============== =============== ===============
John Slimick wrote:
I want to do a little Tkinter in my 1 credit
python practicum, but I am having problems
getting everything installed correctly.
A sample of the problem is below:
------------------- The python source, test.py ------------------
from graphics import *

def main():
win = GraphWin("My Circle", 100, 100)
c = Circle(Point(50 ,50), 10)
c.draw(win)

main()

----------- result of $python test.py --------------------------

Traceback (most recent call last):
File "test.py", line 1, in ?
from graphics import *
File "/home/slimick/cs198/graphics.py", line 85, in ?
import Tkinter
File "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

------------result of $locate _tkinter ------------------------------

/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp.exp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Modules/_dummy_tkinter. c
/usr/src/redhat/SOURCES/Python-2.3.2/Modules/_tkinter.c
/usr/src/redhat/SOURCES/Python-2.3.2/PC/os2vacpp/_tkinter.def
/usr/src/redhat/SOURCES/Python-2.3.2/PCbuild/_tkinter.dsp

--------------------------------------------------------------------

I would appreciate any help on this.

And, thanks in advance

john slimick
slimick@pitt ,edu
university of pittsburgh at bradford


john,
Go here:
http://mail.python.org/pipermail/pyt...er/181603.html
wes


Did you follow the link in my last? I just went through
this problem and it worked for me.
wes

Jul 18 '05 #6
John Slimick <sl*****@venang o.upb.pitt.edu> writes:
Prior to this I installed ActiveTCL8.4 .

So I made what I thought were the appropriate
changes to the "tkinter" section of Setup, I went up
a level (to /usr/src/redhat/SOURCES/Python-2.3.2),
did a "make" and this is what I got:

file libtk8.4.so does not exist

Well, when I do a locate, I find libtk8.4.so
in

/usr/local/ActionTcl/lib/libtk8.4.so

So I am caught with some kind of path problem.

Any ideas or suggestions?


Your tk library is installed in a very non-standard location. Python
can't find it.

I suggest you install tcl and tk from the RH rpms, here's tk, you can
search for tcl:

http://speakeasy.rpmfind.net/linux/r...&system=&arch=

Then put setup back the way it was and try again.

If you are going to use ActiveState products, then install the whole
package including their version of Python. If you do that, then
direct further questions to them.

--
KBK
Jul 18 '05 #7
John Slimick wrote:
I want to do a little Tkinter in my 1 credit
python practicum, but I am having problems
getting everything installed correctly.
A sample of the problem is below:
------------------- The python source, test.py ------------------
from graphics import *

def main():
win = GraphWin("My Circle", 100, 100)
c = Circle(Point(50 ,50), 10)
c.draw(win)

main()

----------- result of $python test.py --------------------------

Traceback (most recent call last):
File "test.py", line 1, in ?
from graphics import *
File "/home/slimick/cs198/graphics.py", line 85, in ?
import Tkinter
File "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

------------result of $locate _tkinter ------------------------------

/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Build/_dummy_tkinter. mcp.exp
/usr/src/redhat/SOURCES/Python-2.3.2/Mac/Modules/_dummy_tkinter. c
/usr/src/redhat/SOURCES/Python-2.3.2/Modules/_tkinter.c
/usr/src/redhat/SOURCES/Python-2.3.2/PC/os2vacpp/_tkinter.def
/usr/src/redhat/SOURCES/Python-2.3.2/PCbuild/_tkinter.dsp

--------------------------------------------------------------------

I would appreciate any help on this.

And, thanks in advance

john slimick
slimick@pitt,ed u
university of pittsburgh at bradford


john,
try this(the correct) link:

http://www.talkaboutprogramming.com/...es/290343.html
wes

Jul 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7041
by: srijit | last post by:
Hello, Any idea - why the following code crashes on my Win 98 machine with Python 2.3? Everytime I run this code, I have to reboot my machine. I also have Win32all-157 installed. from Tkinter import * class App:
1
1900
by: Adolfo | last post by:
Hi: First Issue. I came home to review the GUI making code I wa given at my first Python workshop to find out that the TK of my Python installation is stuck somewhere. If I type: from Tkinter import *
4
2104
by: Peter G Carswell | last post by:
Good Morning. I am new to Tkinter. I have been testing the installation of Tkinter through the python web site. The first two test steps give no errors, 'import _tkinter' and 'import Tkinter'. However, the third step, 'Tkinter._test', gives the error: <function _test at 0xb7ec8df4> Any suggestions?
7
1957
by: krishnakant Mane | last post by:
hello all, I seam to have noticed this a bit late but it appears to me that tkinter is being used very widely for gui development on all platform? is that right? since fredric lundh has written a very good introduction to tkinter (was that just an intro?), I have got keen interest to know the following. may be fredric himself might put some light on these points. 1. I seriously don't intend to start a flame war but does tkinter stand...
3
1521
by: anshunarang | last post by:
I am working on linux..Fedora Core 6, and lately I need to install the software package for continuation techniques, AUTO 2000. For this, I need the plotting tools to be on.Upon starting auto, I get a message saying that plotting tools have been disabled , because TkInter was not enabled during python installation. i did try to install the Tk/ Tcl files from the net, and stll it didnt solve the problem. If anyone could please help as to...
3
2043
by: anshunarang | last post by:
I am working on linux..Fedora Core 6, and lately I need to install the software package for continuation techniques, AUTO 2000. For this, I need the plotting tools to be on.Upon starting auto, I get a message saying that plotting tools have been disabled , because TkInter was not enabled during python installation. i did try to install the Tk/ Tcl files from the net, and stll it didnt solve the problem. If anyone could please help as to...
13
3374
by: Daniel Fetchinson | last post by:
Was looking at PEP 3108, http://www.python.org/dev/peps/pep-3108/ , Is it just me or others also think that it would be a major loss to remove tkinter from the python core? PEP 3108 starts off with: Each module to be removed needs to have a justification as to why it should no longer be distributed with Python. then goes on with,
8
3294
by: karthikbalaguru | last post by:
Hi, One of my python program needs tkinter to be installed to run successfully. I am using Redhat 9.0 and hence tried installing by copying the tkinter-2.2.2-36.i386.rpm alone from the CD 3 to my pc. But, it is not getting installed and is failing by throwing the below errors. Should i need to configure / install any specific files for resolving this issue ?
4
5000
by: njwilson23 | last post by:
I'm having trouble with tkinter on a new installation of Python (2.6), built with the framework option from source that was downloaded from python.org. I'm running OS 10.4 on a PowerPC G4. The problem first arose when I tried to run matplotlib - it couldn't find tcl/tk because it was searching for 8.5, and I had 8.4. I found and built tcl/tk 8.5, which led to a new error, reproduced below: Traceback (most recent call last): File...
0
9872
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10945
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10612
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9453
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7858
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7038
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5885
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4089
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3145
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.