473,587 Members | 2,483 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 3146
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
7014
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
1888
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
2092
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
1941
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
1513
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
2032
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
3346
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
3273
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
4971
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
7924
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
7854
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8219
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
8349
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...
1
7978
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5722
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
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.