473,385 Members | 1,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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,edu
university of pittsburgh at bradford
Jul 18 '05 #1
7 3132
In article <sl********************@venango.upb.pitt.edu>,
John Slimick <sl*****@pitt.edu> 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,edu
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.edu

================================================== ==========
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

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.edu

================================================== ==========
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*****@venango.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,edu
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
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...
1
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...
4
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'....
7
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...
3
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...
3
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...
13
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...
8
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...
4
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.