I have been using Gordon McMillan's Installer and PyInstaller for
years to provide Python scripts under Windows. Now I'm experimenting
it under Unix (Linux / Solaris).
When I run Configure.py, I got the following message:
I: Finding TCL/TK...
I: could not find TCL/TK <<<---
As my Python scripts use TkInter, this is something I need to resolve.
First I thought that my environment was not right. So, I tried it both
under Linux and under Solaris. The Configure script failed to find the
TCL/TK in both platforms.
I tried to decipher the Configure.py script.
It seems using ldd <dynamic link library> to obtain the path to
libtcl.so.
The problem is that no 'ExtensionModule' (with .so) has references to
the tcl library.
I checked the Gordon McMillan's original code and found the same.
Maybe the scheme worked with earlier version but I couldn't see any
reason it would work under current Python + Tcl/Tk software.
I also checked the latest code in the CVS tree but the code remains
the same.
My questions are:
(1) Has anyone used PyInstaller to package Tkinter programs under Unix
(solaris / Linux)?
(2) What is the best way to work around this problem? (Any
suggestions?)
> I have been using Gordon McMillan's Installer and PyInstaller for
> years to provide Python scripts under Windows. Now I'm experimenting
> it under Unix (Linux / Solaris).
> When I run Configure.py, I got the following message:
> I: Finding TCL/TK...
> I: could not find TCL/TK <<<---
> [...]
> My questions are:
> (1) Has anyone used PyInstaller to package Tkinter programs under Unix
> (solaris / Linux)?
> (2) What is the best way to work around this problem? (Any
> suggestions?)
Thank you for letting me know that the PyInstaller can find TCL/TK
under your environment.
I always compile Python from src and don't use IDLE (I won't install
any package unless I'm convinced it is necessary).
If you don't mind, can you post the directory listing of lib-dynload/
in your environment?
The directory contains dynamic link libraries (/usr/local/lib/
python2.5/lib-dynload/ in my environment).
I think there are some additional files in your directory helping
Configure.py to find TCL/TK path.
Thank you!
Aki Niimura
On Jun 26, 12:18 am, Simosito <simos...@gmail.com> wrote:
> Hi,
> I'm using PyInstaller on Linux and I have no problems: Configure.py
> finds everything.
> Have you installed libc6-dev, python-dev, zliblg-dev?
> Does PyInstaller works with non-tk scripts?
> I've installed the Idle package too, before I ran Configure.py
> Maybe you should try to install via something like a package manager
> the IDLE.
> Maybe that silly thing can solve your problem...
> I hope you'll solve this problem of yours,
> Simone Ramacci
> On 25 Giu, 10:20, akineko <akin...@gmail.com> wrote:
> > Hello everyone,
> > I have been using Gordon McMillan's Installer and PyInstaller for
> > years to provide Python scripts under Windows. Now I'm experimenting
> > it under Unix (Linux / Solaris).
> > When I run Configure.py, I got the following message:
> > I: Finding TCL/TK...
> > I: could not find TCL/TK <<<---
> > [...]
> > My questions are:
> > (1) Has anyone used PyInstaller to package Tkinter programs under Unix
> > (solaris / Linux)?
> > (2) What is the best way to work around this problem? (Any
> > suggestions?)
> Thank you for letting me know that the PyInstaller can find TCL/TK > under your environment. > I always compile Python from src and don't use IDLE (I won't install > any package unless I'm convinced it is necessary).
> If you don't mind, can you post the directory listing of lib-dynload/ > in your environment? > The directory contains dynamic link libraries (/usr/local/lib/ > python2.5/lib-dynload/ in my environment). > I think there are some additional files in your directory helping > Configure.py to find TCL/TK path.
> Thank you! > Aki Niimura
> On Jun 26, 12:18 am, Simosito <simos...@gmail.com> wrote:
>> Hi, >> I'm using PyInstaller on Linux and I have no problems: Configure.py >> finds everything.
>> Have you installed libc6-dev, python-dev, zliblg-dev?
>> Does PyInstaller works with non-tk scripts?
>> I've installed the Idle package too, before I ran Configure.py
>> Maybe you should try to install via something like a package manager >> the IDLE.
>> Maybe that silly thing can solve your problem...
>> I hope you'll solve this problem of yours, >> Simone Ramacci
>> On 25 Giu, 10:20, akineko <akin...@gmail.com> wrote:
>>> Hello everyone,
>>> I have been using Gordon McMillan's Installer and PyInstaller for >>> years to provide Python scripts under Windows. Now I'm experimenting >>> it under Unix (Linux / Solaris).
>>> When I run Configure.py, I got the following message:
>>> I: Finding TCL/TK... >>> I: could not find TCL/TK <<<---
>>> [...]
>>> My questions are: >>> (1) Has anyone used PyInstaller to package Tkinter programs under Unix >>> (solaris / Linux)? >>> (2) What is the best way to work around this problem? (Any >>> suggestions?)
>>> Thank you for your attention.
>>> Best regards, >>> Aki Niimura
On my O.s. (Ubuntu 8.04) the only thing in /usr/local/lib/python is the site-packages directory. What's your O.s.? (What Linux/Solaris distribution and/or version)
Why don't you see what ./Configure says if you try to build the IDLE? If it can't find Tcl/tk either, maybe there is something wrong in your system.
Some Linux distributions changed how software packages are installed.
Instead of prefix=/usr/local, they used prefix=/usr, which I don't
like.
You can find your python installation under /usr/, and dynamic link
libaries are possibly under:
(1) /usr/lib/python2.x/lib-dynload
(2) /usr/lib64/python2.x/lib-dynload
2.x = 2.4 or 2.5 or ...
If you install Python from src, all goes under /usr/local unless you
changed prefix.
I asked you the directory listing as I knew ./Configure uses ldd to
find the path.
IDLE could be the reason for this as IDLE uses GUI.
I will experiment by myself.
Thanks,
Aki Niimura
On Jun 26, 3:07 am, "Simone Ramacci - Simosito.it"
> > Thank you for letting me know that the PyInstaller can find TCL/TK
> > under your environment.
> > I always compile Python from src and don't use IDLE (I won't install
> > any package unless I'm convinced it is necessary).
> > If you don't mind, can you post the directory listing of lib-dynload/
> > in your environment?
> > The directory contains dynamic link libraries (/usr/local/lib/
> > python2.5/lib-dynload/ in my environment).
> > I think there are some additional files in your directory helping
> > Configure.py to find TCL/TK path.
> > Thank you!
> > Aki Niimura
> > On Jun 26, 12:18 am, Simosito <simos...@gmail.com> wrote:
> >> Hi,
> >> I'm using PyInstaller on Linux and I have no problems: Configure.py
> >> finds everything.
> >> Have you installed libc6-dev, python-dev, zliblg-dev?
> >> Does PyInstaller works with non-tk scripts?
> >> I've installed the Idle package too, before I ran Configure.py
> >> Maybe you should try to install via something like a package manager
> >> the IDLE.
> >> Maybe that silly thing can solve your problem...
> >> I hope you'll solve this problem of yours,
> >> Simone Ramacci
> >> On 25 Giu, 10:20, akineko <akin...@gmail.com> wrote:
> >>> Hello everyone,
> >>> I have been using Gordon McMillan's Installer and PyInstaller for
> >>> years to provide Python scripts under Windows. Now I'm experimenting
> >>> it under Unix (Linux / Solaris).
> >>> When I run Configure.py, I got the following message:
> >>> I: Finding TCL/TK...
> >>> I: could not find TCL/TK <<<---
> >>> [...]
> >>> My questions are:
> >>> (1) Has anyone used PyInstaller to package Tkinter programs under Unix
> >>> (solaris / Linux)?
> >>> (2) What is the best way to work around this problem? (Any
> >>> suggestions?)
> >>> Thank you for your attention.
> >>> Best regards,
> >>> Aki Niimura
> On my O.s. (Ubuntu 8.04) the only thing in /usr/local/lib/python is the
> site-packages directory.
> What's your O.s.? (What Linux/Solaris distribution and/or version)
> Why don't you see what ./Configure says if you try to build the IDLE?
> If it can't find Tcl/tk either, maybe there is something wrong in your
> system.
> Some Linux distributions changed how software packages are installed. > Instead of prefix=/usr/local, they used prefix=/usr, which I don't > like. > You can find your python installation under /usr/, and dynamic link > libaries are possibly under: > (1) /usr/lib/python2.x/lib-dynload > (2) /usr/lib64/python2.x/lib-dynload > 2.x = 2.4 or 2.5 or ...
> If you install Python from src, all goes under /usr/local unless you > changed prefix. > I asked you the directory listing as I knew ./Configure uses ldd to > find the path.
> IDLE could be the reason for this as IDLE uses GUI. > I will experiment by myself.
> Thanks, > Aki Niimura
> On Jun 26, 3:07 am, "Simone Ramacci - Simosito.it" > <simos...@gmail.com> wrote:
>> akineko ha scritto:
>>> Hello Simone Ramacci,
>>> Thank you for letting me know that the PyInstaller can find TCL/TK >>> under your environment. >>> I always compile Python from src and don't use IDLE (I won't install >>> any package unless I'm convinced it is necessary).
>>> If you don't mind, can you post the directory listing of lib-dynload/ >>> in your environment? >>> The directory contains dynamic link libraries (/usr/local/lib/ >>> python2.5/lib-dynload/ in my environment). >>> I think there are some additional files in your directory helping >>> Configure.py to find TCL/TK path.
>>> Thank you! >>> Aki Niimura
>>> On Jun 26, 12:18 am, Simosito <simos...@gmail.com> wrote:
>>>> Hi, >>>> I'm using PyInstaller on Linux and I have no problems: Configure.py >>>> finds everything.
>>>> Have you installed libc6-dev, python-dev, zliblg-dev?
>>>> Does PyInstaller works with non-tk scripts?
>>>> I've installed the Idle package too, before I ran Configure.py
>>>> Maybe you should try to install via something like a package manager >>>> the IDLE.
>>>> Maybe that silly thing can solve your problem...
>>>> I hope you'll solve this problem of yours, >>>> Simone Ramacci
>>>> On 25 Giu, 10:20, akineko <akin...@gmail.com> wrote:
>>>>> Hello everyone,
>>>>> I have been using Gordon McMillan's Installer and PyInstaller for >>>>> years to provide Python scripts under Windows. Now I'm experimenting >>>>> it under Unix (Linux / Solaris).
>>>>> When I run Configure.py, I got the following message:
>>>>> I: Finding TCL/TK... >>>>> I: could not find TCL/TK <<<---
>>>>> [...]
>>>>> My questions are: >>>>> (1) Has anyone used PyInstaller to package Tkinter programs under Unix >>>>> (solaris / Linux)? >>>>> (2) What is the best way to work around this problem? (Any >>>>> suggestions?)
>>>>> Thank you for your attention.
>>>>> Best regards, >>>>> Aki Niimura
>> On my O.s. (Ubuntu 8.04) the only thing in /usr/local/lib/python is the >> site-packages directory. >> What's your O.s.? (What Linux/Solaris distribution and/or version)
>> Why don't you see what ./Configure says if you try to build the IDLE? >> If it can't find Tcl/tk either, maybe there is something wrong in your >> system.
Thank you for your prompt posting.
Yes, it does help my investigation.
Your lib-dynload contains _tkinter.so but no _tkinter.so in my lib-
dynload directory.
Now I found something interesting.
I found _tkinter.so in lib-dynload under lib/python2.4 but not under
lib/python2.5!
(My Tkinter programs works fine without _tkinter.so)
This may be something to do with how Python 2.5 deals with Tkinter.
Tkinter is now integrated into Python ditribution while it was a
separate external package in earlier Python releases.
I may reinstall Python 2.4 and try PyInstaller with it.
I will investigate further.
Thank you.
Aki Niimura
On Jun 26, 8:59 am, "Simone Ramacci - Simosito.it"
> > Some Linux distributions changed how software packages are installed.
> > Instead of prefix=/usr/local, they used prefix=/usr, which I don't
> > like.
> > You can find your python installation under /usr/, and dynamic link
> > libaries are possibly under:
> > (1) /usr/lib/python2.x/lib-dynload
> > (2) /usr/lib64/python2.x/lib-dynload
> > 2.x = 2.4 or 2.5 or ...
> > If you install Python from src, all goes under /usr/local unless you
> > changed prefix.
> > I asked you the directory listing as I knew ./Configure uses ldd to
> > find the path.
> > IDLE could be the reason for this as IDLE uses GUI.
> > I will experiment by myself.
> > Thanks,
> > Aki Niimura
> > On Jun 26, 3:07 am, "Simone Ramacci - Simosito.it"
> > <simos...@gmail.com> wrote:
> >> akineko ha scritto:
> >>> Hello Simone Ramacci,
> >>> Thank you for letting me know that the PyInstaller can find TCL/TK
> >>> under your environment.
> >>> I always compile Python from src and don't use IDLE (I won't install
> >>> any package unless I'm convinced it is necessary).
> >>> If you don't mind, can you post the directory listing of lib-dynload/
> >>> in your environment?
> >>> The directory contains dynamic link libraries (/usr/local/lib/
> >>> python2.5/lib-dynload/ in my environment).
> >>> I think there are some additional files in your directory helping
> >>> Configure.py to find TCL/TK path.
> >>> Thank you!
> >>> Aki Niimura
> >>> On Jun 26, 12:18 am, Simosito <simos...@gmail.com> wrote:
> >>>> Hi,
> >>>> I'm using PyInstaller on Linux and I have no problems: Configure.py
> >>>> finds everything.
> >>>> Have you installed libc6-dev, python-dev, zliblg-dev?
> >>>> Does PyInstaller works with non-tk scripts?
> >>>> I've installed the Idle package too, before I ran Configure.py
> >>>> Maybe you should try to install via something like a package manager
> >>>> the IDLE.
> >>>> Maybe that silly thing can solve your problem...
> >>>> I hope you'll solve this problem of yours,
> >>>> Simone Ramacci
> >>>> On 25 Giu, 10:20, akineko <akin...@gmail.com> wrote:
> >>>>> Hello everyone,
> >>>>> I have been using Gordon McMillan's Installer and PyInstaller for
> >>>>> years to provide Python scripts under Windows. Now I'm experimenting
> >>>>> it under Unix (Linux / Solaris).
> >>>>> When I run Configure.py, I got the following message:
> >>>>> I: Finding TCL/TK...
> >>>>> I: could not find TCL/TK <<<---
> >>>>> [...]
> >>>>> My questions are:
> >>>>> (1) Has anyone used PyInstaller to package Tkinter programs under Unix
> >>>>> (solaris / Linux)?
> >>>>> (2) What is the best way to work around this problem? (Any
> >>>>> suggestions?)
> >>>>> Thank you for your attention.
> >>>>> Best regards,
> >>>>> Aki Niimura
> >> On my O.s. (Ubuntu 8.04) the only thing in /usr/local/lib/python is the
> >> site-packages directory.
> >> What's your O.s.? (What Linux/Solaris distribution and/or version)
> >> Why don't you see what ./Configure says if you try to build the IDLE?
> >> If it can't find Tcl/tk either, maybe there is something wrong in your
> >> system.
> Thank you for your prompt posting. > Yes, it does help my investigation. > Your lib-dynload contains _tkinter.so but no _tkinter.so in my lib- > dynload directory. > Now I found something interesting. > I found _tkinter.so in lib-dynload under lib/python2.4 but not under > lib/python2.5! > (My Tkinter programs works fine without _tkinter.so)
> This may be something to do with how Python 2.5 deals with Tkinter. > Tkinter is now integrated into Python ditribution while it was a > separate external package in earlier Python releases.
> I will investigate further.
> Thank you. > Aki Niimura
I don't think that python changed the way it implements Tk from v2.4 to v2.5 (I found _tkinter.so into a py2.5 dir). I've noticed that both under linux (package manager) and windows (setup) the tk support can be installed separately. Therefore, are you sure that when you run your script from console you use py2.5 and not py2.4? Couldn't be possible that you didn't, somehow, compiled well python 2.5?
I have been building Python from source for many years.
I'm using Python 2.5 and my Tkinter program is not using _tkinter.so
(I verified it using ldd and truss).
I'm almost fully convinced that the Python developers changed the way
Python interacts with Tkinter.
The reason why you have _tkinter.so in your lib-dynload is probably
the package creater included it for some reason.
That is the problem if you don't compile from scratch although it
saves time.
BTW, I compiled Python 2.4 again and found it generated _tkinter.so.
Python 2.5 is generating _tkinter.o (not .so) but no _tkinter.so.
Anyway, after the above experiments, I posted a question to Python
newsgroup hoping somebody clarifies this mystery.
I will update once I have a clear answer.
Aki Niimura
On Jun 26, 10:33 pm, "Simone Ramacci - Simosito.it"
<simos...@gmail.com> wrote:
> > Thank you for your prompt posting.
> > Yes, it does help my investigation.
> > Your lib-dynload contains _tkinter.so but no _tkinter.so in my lib-
> > dynload directory.
> > Now I found something interesting.
> > I found _tkinter.so in lib-dynload under lib/python2.4 but not under
> > lib/python2.5!
> > (My Tkinter programs works fine without _tkinter.so)
> > This may be something to do with how Python 2.5 deals with Tkinter.
> > Tkinter is now integrated into Python ditribution while it was a
> > separate external package in earlier Python releases.
> > I will investigate further.
> > Thank you.
> > Aki Niimura
> I don't think that python changed the way it implements Tk from v2.4 to
> v2.5 (I found _tkinter.so into a py2.5 dir).
> I've noticed that both under linux (package manager) and windows (setup)
> the tk support can be installed separately.
> Therefore, are you sure that when you run your script from console you
> use py2.5 and not py2.4? Couldn't be possible that you didn't, somehow,
> compiled well python 2.5?
> I have been building Python from source for many years. > I'm using Python 2.5 and my Tkinter program is not using _tkinter.so > (I verified it using ldd and truss). > I'm almost fully convinced that the Python developers changed the way > Python interacts with Tkinter. > The reason why you have _tkinter.so in your lib-dynload is probably > the package creater included it for some reason. > That is the problem if you don't compile from scratch although it > saves time.
> BTW, I compiled Python 2.4 again and found it generated _tkinter.so. > Python 2.5 is generating _tkinter.o (not .so) but no _tkinter.so.
> Anyway, after the above experiments, I posted a question to Python > newsgroup hoping somebody clarifies this mystery. > I will update once I have a clear answer.