Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How can I get Tkinter to work in Python? (I tried many things)

Reply
Thread Tools

How can I get Tkinter to work in Python? (I tried many things)

 
 
tomzam@gmail.com
Guest
Posts: n/a
 
      04-28-2009
I am trying to get Tkinter to work with my Python build.
I've scoured usenet(comp.lang.Python) and google and there's
information that's helpful but I just can't seam to get it completely
right. I tried many of the suggestion, but nothing seems to work
My setup is Fedora Core 6 [my yum is also broken. (sigh. yes, I know
I should upgrade)]
I've download Tcl/Tk from Active State and installed it here:
/usr/ActiveTcl-8.5
My python to build is in this directory:
/home/tomzam/mylib6/Python-2.6.2
I removed the comment symbol (#) from the line:
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
in the Modules/Setup
so the lines in the Setup file look like this:

# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/ActiveTcl-8.5/lib/tk8.5 \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/ActiveTcl-8.5/include/tcl8.5 \
when I run ./configure in /home/tomzam/mylib6/Python-2.6.2 everything
looks
right but then I try running make in /home/tomzam/mylib6/Python-2.6.2

There are errors, but since there is many of them:
here is a cut out of the _tkinter errors:

libpython2.6.a(_tkinter.o): In function `Tkapp_CallProc':
/home/tomzam/mylib6/Python-2.6.2/./Modules/_tkinter.c:1263: undefined
reference to `Tcl_MutexLock'
/home/tomzam/mylib6/Python-2.6.2/./Modules/_tkinter.c:1264: undefined
reference to `Tcl_ConditionNotify'
/home/tomzam/mylib6/Python-2.6.2/./Modules/_tkinter.c:1265: undefined
reference to `Tcl_MutexUnlock'
/home/tomzam/mylib6/Python-2.6.2/./Modules/_tkinter.c:1251: undefined
reference to `Tcl_GetStringResult'
libpython2.6.a(_tkinter.o): In function `Tkapp_CallDeallocArgs':
/home/tomzam/mylib6/Python-2.6.2/./Modules/_tkinter.c:1123: undefined
reference to `Tcl_Free'
libpython2.6.a(tkappinit.o): In function `Tcl_AppInit':
/home/tomzam/mylib6/Python-2.6.2/./Modules/tkappinit.c:48: undefined
reference to `Tcl_Init'
/home/tomzam/mylib6/Python-2.6.2/./Modules/tkappinit.c:77: undefined
reference to `Tcl_GetVar'
/home/tomzam/mylib6/Python-2.6.2/./Modules/tkappinit.c:81: undefined
reference to `Tk_Init'
/home/tomzam/mylib6/Python-2.6.2/./Modules/tkappinit.c:84: undefined
reference to `Tk_MainWindow'
/home/tomzam/mylib6/Python-2.6.2/./Modules/tkappinit.c:81: undefined
reference to `Tk_Init'
collect2: ld returned 1 exit status
make: *** [python] Error 1

But since they are all undefined references - I feel I'm pretty close
to a solution.

Can you help me the rest of the way?
I'm trying to make tkinter work with my local Python install,
any help will be appreciated!

Thank in advance,
-Tom Z
 
Reply With Quote
 
 
 
 
Peter Pearson
Guest
Posts: n/a
 
      04-28-2009
On Mon, 27 Apr 2009 17:49:26 -0700 (PDT), http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
[snip]
> There are errors, but since there is many of them:
> here is a cut out of the _tkinter errors:
>
> libpython2.6.a(_tkinter.o): In function `Tkapp_CallProc':
> /home/tomzam/mylib6/Python-2.6.2/./Modules/_tkinter.c:1263: undefined
> reference to `Tcl_MutexLock'


I believe this message means that something named _tkinter.c
was previously compiled into an object file named
_tkinter.o, which was bundled into a library named
libpython2.6.a; and that when you attempt to use
libpython2.6.a to satisfy the external references of something
(not identified) that you're trying to link, the linker
discovers that _tkinter.o contains a function Tkapp_CallProc
that (on line 1263 of _tkinter.c) attempts to call function
Tcl_MutexLock, but the linker can't find anything named
Tcl_MutexLock to satisfy it.

Tcl_MutexLock is probably *supposed* to be provided by some
Tcl runtime library, but not being very knowledgeable, I
don't know what library. Just before the beginning of the
list of error messages, you'll probably find the command line
that's running the linker, and it probably names a bunch of
libraries, one of which is supposed to include Tcl_Mutexlock
but doesn't. I apologize for being so vague; with any luck,
someone much smarter will come along soon.

--
To email me, substitute nowhere->spamcop, invalid->net.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
RE;Kontki if you delete kontiki any program you loaded with it in it 'will not work I have tried it with three programs and none work anymore (if you se it just stop download) 1-Twitch Computer Support 5 04-23-2009 02:45 PM
Can anyone tell me if pygame and Tkinter can work together? Nathan Pinno Python 1 11-16-2005 01:28 AM
Hi I am new to asp i can not get it to work on xp pro sp2 even though the localhost work but asp pages dont so can some one help craig dicker ASP .Net 9 07-07-2005 11:52 AM
Mechanize: Can't get it to work. Can I help make it work next week? Xeno Campanoli Ruby 1 07-01-2005 10:32 PM



Advertisments