[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

question about tkinter

robert schaefer

3/17/2010 12:24:00 PM

Hello,

This is my first posting to this list so please be gentle -

I am new to python and am using it on red-hat linux (I am new to that too).
I am responsible for installing open source packages (including python) onto a distributed system of linux boxes.

My question is, on python version 2.6.2 tkinter refuses to install.
Without tkinter, I cannot use Idle.

I looked at the install/configure script and hacked it a bit, but every fix only caused new problems.
There are serious issues with that script for finding necessary libraries.

We have a Sun-OS box with python version 2.5.x (I don't know the means of installation) that
tkinter installed correctly, and Idle works fine.

My question is - has anyone else noticed the problem of tkinter and red-hat linux?
Has this been corrected in python 2.6.4 (or 2.6.5)?

thanks,
bob s.


-----------------------------------
robert schaefer
Atmospheric Sciences Group
MIT Haystack Observatory
Westford, MA 01886

email: rps@haystack.mit.edu
voice: 781-981-5767
www: http://www.haysta...

6 Answers

Peter Otten

3/17/2010 1:01:00 PM

0

robert schaefer wrote:

> This is my first posting to this list so please be gentle -
>
> I am new to python and am using it on red-hat linux (I am new to that
> too). I am responsible for installing open source packages (including
> python) onto a distributed system of linux boxes.
>
> My question is, on python version 2.6.2 tkinter refuses to install.

Does it say "I'm sorry Bob, I'm afraid I can't do this"?

> Without tkinter, I cannot use Idle.
>
> I looked at the install/configure script and hacked it a bit, but every
> fix only caused new problems.
> There are serious issues with that script for finding necessary
> libraries.

If there are serious problems you have to give some details.

However, if in the past a newbie had problems with Tkinter support on linux
the most frequent problem was that the Tcl/Tk development libraries weren't
installed. I don't know how those are called on Red Hat, maybe something
like

tcl*-dev.rpm

Did you install these before running the configure script?

Peter

robert schaefer

3/17/2010 1:33:00 PM

0


Peter,

Most of my life has been dealing with recalcitrant HAL's in one guise or another.
These days, I think HAL has permanently taken up residence in Toyota's engine and brakes.
"Stop the car Dave? Have you changed my oil or even washed me lately?"
Some serious "sneak paths" are going on.

Anyway -

tkinter is in two parts:
1. a python wrapper
2. c code

Both are present in the 2.6.2 python download.
It appears to be a "I can't find the library" path problem not a file existence problem.

1. gcc can't find the libraries that tkinter c code links to ( I could fix that)
2. the python installer can't find all the library paths to all the pieces
- I started fixing this, then determined it would be easier to rewrite from scratch than patch.
That is, the given method of building paths in the script are way off from reality, not just an
add this one path and everything will now work kind of magic.
I felt that the "official" python people would have an easier time of this - so gave up.

bob

On Mar 17, 2010, at 9:00 AM, Peter Otten wrote:

> robert schaefer wrote:
>
>> This is my first posting to this list so please be gentle -
>>
>> I am new to python and am using it on red-hat linux (I am new to that
>> too). I am responsible for installing open source packages (including
>> python) onto a distributed system of linux boxes.
>>
>> My question is, on python version 2.6.2 tkinter refuses to install.
>
> Does it say "I'm sorry Bob, I'm afraid I can't do this"?
>
>> Without tkinter, I cannot use Idle.
>>
>> I looked at the install/configure script and hacked it a bit, but every
>> fix only caused new problems.
>> There are serious issues with that script for finding necessary
>> libraries.
>
> If there are serious problems you have to give some details.
>
> However, if in the past a newbie had problems with Tkinter support on linux
> the most frequent problem was that the Tcl/Tk development libraries weren't
> installed. I don't know how those are called on Red Hat, maybe something
> like
>
> tcl*-dev.rpm
>
> Did you install these before running the configure script?
>
> Peter
> --
> http://mail.python.org/mailman/listinfo/p...
>
> !DSPAM:4ba0d3cd3229021468!
>

-----------------------------------
robert schaefer
Atmospheric Sciences Group
MIT Haystack Observatory
Westford, MA 01886

email: rps@haystack.mit.edu
voice: 781-981-5767
www: http://www.haysta...

Peter Otten

3/17/2010 2:00:00 PM

0

robert schaefer wrote:

> tkinter is in two parts:
> 1. a python wrapper
> 2. c code
>
> Both are present in the 2.6.2 python download.
> It appears to be a "I can't find the library" path problem not a file
> existence problem.
>
> 1. gcc can't find the libraries that tkinter c code links to ( I could fix
> that) 2. the python installer can't find all the library paths to all the
> pieces - I started fixing this, then determined it would be easier to
> rewrite from scratch than patch. That is, the given method of building
> paths in the script are way off from reality, not just an add this one
> path and everything will now work kind of magic. I felt that the
> "official" python people would have an easier time of this - so gave up.

Just to exclude the simple problems (unfortunately I can't help you with the
hard ones): Are the tcl development packages installed on your system?

Peter

robert schaefer

3/17/2010 2:34:00 PM

0

No, And there's a reason (perhaps not a great one - but I'm got some constraints).

I am not the system administrator and the tcl installer wants to be
installed as root. I tried it.

The rationale for not doing this is that the installation packages that I am administrator for,
are all installed in non-root directories. by non-root people.
If I have to install any package as root, then that becomes
"different". The machines are all linux and intended to be swappable/exchangeable and installed by
anyone without root access. This simplifies maintenance when a large number of boxes are involved.

Are there any tcl/tk packages that permit re-direction of installation to non-root directories?

This problem is just an ongoing irritation, python works fine without tkinter, I just can't get idle
to work without it.

Related to that I tailored Ipython to work with gtk (ipython's default was tkinter) - tailoring was by a command
- is there any way to command idle to use gtk?


On Mar 17, 2010, at 9:59 AM, Peter Otten wrote:

> robert schaefer wrote:
>
>> tkinter is in two parts:
>> 1. a python wrapper
>> 2. c code
>>
>> Both are present in the 2.6.2 python download.
>> It appears to be a "I can't find the library" path problem not a file
>> existence problem.
>>
>> 1. gcc can't find the libraries that tkinter c code links to ( I could fix
>> that) 2. the python installer can't find all the library paths to all the
>> pieces - I started fixing this, then determined it would be easier to
>> rewrite from scratch than patch. That is, the given method of building
>> paths in the script are way off from reality, not just an add this one
>> path and everything will now work kind of magic. I felt that the
>> "official" python people would have an easier time of this - so gave up.
>
> Just to exclude the simple problems (unfortunately I can't help you with the
> hard ones): Are the tcl development packages installed on your system?
>
> Peter
>
> --
> http://mail.python.org/mailman/listinfo/p...
>
> !DSPAM:4ba0e1dc51621869525538!
>

-----------------------------------
robert schaefer
Atmospheric Sciences Group
MIT Haystack Observatory
Westford, MA 01886

email: rps@haystack.mit.edu
voice: 781-981-5767
www: http://www.haysta...

Terry Reedy

3/17/2010 8:21:00 PM

0

On 3/17/2010 10:33 AM, robert schaefer wrote:
> No, And there's a reason (perhaps not a great one - but I'm got some constraints).

> Related to that I tailored Ipython to work with gtk (ipython's default was tkinter) - tailoring was by a command
> - is there any way to command idle to use gtk?

I am pretty sure not, the gui is hard-coded with tkinter.

furlan

3/18/2010 8:44:00 PM

0

On Wed, 17 Mar 2010 09:32:46 -0400, robert schaefer wrote:

> Peter,
>
> Most of my life has been dealing with recalcitrant HAL's in one guise or
> another. These days, I think HAL has permanently taken up residence in
> Toyota's engine and brakes. "Stop the car Dave? Have you changed my oil
> or even washed me lately?" Some serious "sneak paths" are going on.

<snip>

Don't know if this will help and I had in a file in my Solutions folder
from 2008 the following:

If Tkinter does not seem to be loaded run:

sudo yum -y install python-tools

which will install Tkinter and dependencies.

HTH

ciao,
f

--
aa #2301
"I often work by avoidance."
-- Brian Eno