Google Groups Home
Help | Sign in
PyInstaller withTCL/TK
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
akineko  
View profile
 More options Jun 25, 4:20 am
From: akineko <akin...@gmail.com>
Date: Wed, 25 Jun 2008 01:20:58 -0700 (PDT)
Local: Wed, Jun 25 2008 4:20 am
Subject: PyInstaller withTCL/TK
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  <<<---

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?)

Thank you for your attention.

Best regards,
Aki Niimura


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simosito  
View profile
 More options Jun 26, 3:18 am
From: Simosito <simos...@gmail.com>
Date: Thu, 26 Jun 2008 00:18:38 -0700 (PDT)
Local: Thurs, Jun 26 2008 3:18 am
Subject: Re: PyInstaller withTCL/TK
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:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
akineko  
View profile
 More options Jun 26, 5:32 am
From: akineko <akin...@gmail.com>
Date: Thu, 26 Jun 2008 02:32:20 -0700 (PDT)
Local: Thurs, Jun 26 2008 5:32 am
Subject: Re: PyInstaller withTCL/TK
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:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Ramacci - Simosito.it  
View profile
 More options Jun 26, 6:07 am
From: "Simone Ramacci - Simosito.it" <simos...@gmail.com>
Date: Thu, 26 Jun 2008 12:07:12 +0200
Local: Thurs, Jun 26 2008 6:07 am
Subject: Re: [PyInstaller] Re: PyInstaller withTCL/TK
akineko ha scritto:

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.

Let me know,
Simone Ramacci

P.s.

My tcl version is 8.4.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
akineko  
View profile
 More options Jun 26, 11:49 am
From: akineko <akin...@gmail.com>
Date: Thu, 26 Jun 2008 08:49:22 -0700 (PDT)
Local: Thurs, Jun 26 2008 11:49 am
Subject: Re: PyInstaller withTCL/TK
Hello Simone Ramacci,

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"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Ramacci - Simosito.it  
View profile
 More options Jun 26, 11:59 am
From: "Simone Ramacci - Simosito.it" <simos...@gmail.com>
Date: Thu, 26 Jun 2008 17:59:58 +0200
Local: Thurs, Jun 26 2008 11:59 am
Subject: Re: [PyInstaller] Re: PyInstaller withTCL/TK
akineko ha scritto:

#ls /usr/lib/python2.5/lib-dynload
array.so            _csv.so           imageop.so             rgbimg.so
audioop.so          _ctypes.so        itertools.so           select.so
binascii.so         _ctypes_test.so   linuxaudiodev.so       _socket.so
_bisect.so          _curses_panel.so  _locale.so             spwd.so
_bsddb.so           _curses.so        _lsprof.so             _sqlite3.so
bz2.so              datetime.so       math.so                _ssl.so
cmath.so            dbm.so            mmap.so                strop.so
_codecs_cn.so       dl.so             _multibytecodec.so     _struct.so
_codecs_hk.so       _elementtree.so   nis.so                 syslog.so
_codecs_iso2022.so  fcntl.so          operator.so            termios.so
_codecs_jp.so       fpectl.so         ossaudiodev.so         _testcapi.so
_codecs_kr.so       _functools.so     parser.so              time.so
_codecs_tw.so       gdbm.so           pyexpat.so             _tkinter.so
collections.so      grp.so            Python-2.5.2.egg-info  unicodedata.so

Does that help you somehow?

I hope it does.
Cheers,
Simone Ramacci


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
akineko  
View profile
 More options Jun 26, 2:56 pm
From: akineko <akin...@gmail.com>
Date: Thu, 26 Jun 2008 11:56:38 -0700 (PDT)
Local: Thurs, Jun 26 2008 2:56 pm
Subject: Re: PyInstaller withTCL/TK
Hello Simone Ramacci,

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"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Ramacci - Simosito.it  
View profile
 More options Jun 27, 1:33 am
From: "Simone Ramacci - Simosito.it" <simos...@gmail.com>
Date: Fri, 27 Jun 2008 07:33:11 +0200
Local: Fri, Jun 27 2008 1:33 am
Subject: Re: [PyInstaller] Re: PyInstaller withTCL/TK

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?

Best regards,
Simone Ramacci


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
akineko  
View profile
 More options Jun 27, 3:01 am
From: akineko <akin...@gmail.com>
Date: Fri, 27 Jun 2008 00:01:53 -0700 (PDT)
Local: Fri, Jun 27 2008 3:01 am
Subject: Re: PyInstaller withTCL/TK
Hello Simone Ramacci,

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"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Ramacci - Simosito.it  
View profile
 More options Jun 27, 3:17 am
From: "Simone Ramacci - Simosito.it" <simos...@gmail.com>
Date: Fri, 27 Jun 2008 09:17:12 +0200
Local: Fri, Jun 27 2008 3:17 am
Subject: Re: [PyInstaller] Re: PyInstaller withTCL/TK
akineko ha scritto: