tkinter problem

P

Paul Simon

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.
Paul Simon
 
C

Chris Rebert

I have the "tkinter" problem and need some assistance to straighten it out.
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
 
P

Paul Simon

I have the "tkinter" problem and need some assistance to straighten it
out.
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.

Paul
 
P

Peter Otten

Paul said:
- 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
 
P

Paul Simon

Peter Otten said:
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

Thank you Peter. I understand what you are saying but don't know how to do
it. Although I installed from source, I followed a "cookbook" recipe.
Could you tell me what files to execute, where they might be, and file
arguments? I'm just ignorant, not stupid. ;-).

Paul
 
P

Peter Otten

Paul said:
Thank you Peter. I understand what you are saying but don't know how to
do
it. Although I installed from source, I followed a "cookbook" recipe.
Could you tell me what files to execute, where they might be, and file
arguments? I'm just ignorant, not stupid. ;-).

Paul

Once you have the necessary development packages for tcl/tk just go into the
directory where you unzipped the source and

../configure
make
sudo make altinstall

Unfortunately I don't know the names of these packages nor how to install
them, and Google didn't turn up anything useful.

If you don't get any additional answers here you may try a Mandriva forum
since this is not a question that requires python knowlegde.

Peter
 
T

Terry Reedy

Paul said:
Thank you Peter. I understand what you are saying but don't know how to do
it. Although I installed from source, I followed a "cookbook" recipe.
Could you tell me what files to execute, where they might be, and file
arguments? I'm just ignorant, not stupid. ;-).

Is there a Mandriva list where you can ask such distribution-specific
questions?
 
D

David Smith

Paul said:
Thank you Peter. I understand what you are saying but don't know how to do
it. Although I installed from source, I followed a "cookbook" recipe.
Could you tell me what files to execute, where they might be, and file
arguments? I'm just ignorant, not stupid. ;-).

Paul

Just install the tkinter package from the Mandriva Linux Control
Center's Software Management system. I just did it, doing a search for
tkinter brought it right up. All done.

--David
 
P

Paul Simon

David Smith said:
Just install the tkinter package from the Mandriva Linux Control
Center's Software Management system. I just did it, doing a search for
tkinter brought it right up. All done.

--David

Thanks to all for your patient help. I have made some progress, but still
no success. I installed Active Tcl-8.5.7 and corrected the PATH
accordingly. However I still get a "missing" message on building Python.
"Failed to find the necessary bits (!) to build these modules:

.....
_tkinter (among others)
To find the necessary bits, look in setup.py in detect_modules() for teh
module's name."

Not sure what bits are, euphemism? but am about to wipe the disk and
reinstall linux, etc.

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top