tkinter problem

Peter Otten __peter__ at web.de
Thu Jul 9 03:59:54 EDT 2009


Paul Simon wrote:

> "Chris Rebert" <clp2 at rebertia.com> wrote in message
> news:mailman.2863.1247095339.8015.python-list at python.org...
> On Wed, Jul 8, 2009 at 4:18 PM, Paul Simon<psimon at sonic.net> wrote:
>> I have the "tkinter" problem and need some assistance to straighten it
>> out.
>> >From the web page "http://wiki.python.org/moin/TkInter" I tested as in
>> >"step
>> 1" and cannot import "_tkinter." I do not have that file on my computer,
>> but
>> do have tkinter.py in /usr/local/lib/python2.6/lib-tk. as well as the
>> directories /usr/lib/tk8.5 and /usr/lib/tcl8.5.
>> This python stuff is great, but the documentation frequently
>> feels like it is just a bit out of my grasp. I realize that all of this
>> is free but I understand the instructions on the web page to repair only
>> to the
>> point of confusion. I'm not an expert. How do I modify my python
>> configuration? Is there a file that needs to be edited? Which setup.py
>> file
>> do I use? Make? or python setup.py build and python setup.py install?
>> Thanks. I appreciate your help.
> 
> - How did you install Python?
> - What Linux distro are you using?
> 
> Cheers,
> Chris
> http://blog.rebertia.com
> I"m using Mandriva 2008.1.  I have to tell you honestly that I'm not sure
> exactly how I installed Python.  Originally I had installed 2.5 from RPM
> but 2.6 was not available for my distro (2008.1) in RPM.  I downloaded
> something from python.org and installed.  Not sure if it was tarball or
> zip file.

Zip or tar doesn't matter, you are installing "from source".

Python has to find the necessary include files for tcl/tk. These are in 
separate packages that you have to install before you invoke Python's 
configure script.

I don't know what they are called on your system -- look for tk-dev.rpm, 
tcl-dev.rpm or similar.

You may run into the same problem with other modules like readline.

Peter




More information about the Python-list mailing list