Re: [cx-freeze-users] Tcl8.5 not installed/included? But the dll files were copied over to dist
Brought to you by:
atuining
From: Kevin H. <kev...@tw...> - 2010-12-30 08:26:09
|
Thanks for the timely response Anthony, I could copied the tcl8.5 and tk8.5 directories into where I was running Main.exe (the result) and it would run just fine. So at least the immediate problem has been solved. I think it'd be cool if these directories could be copied over into the library.zip, but I'll admit I have 0 working knowledge of how things actually work at the moment on the larger scale of things. On Wed, Dec 29, 2010 at 1:52 PM, Anthony Tuininga < ant...@gm...> wrote: > On Tue, Dec 28, 2010 at 8:38 PM, Kevin Huang > <kev...@tw...> wrote: > > Hi everyone, > > First time writing up something in Python and trying to get it to exe for > > use. I went with Python3 (3.1) and later found cx_freeze when found out > that > > py2exe doesn't really do the job. I wrote a script that uses tkinter for > the > > GUI and my exe wouldn't run. > > This is the error I got for running Main.exe (my program): > > ------------------------------ > > D:\Programming\Workspace\PyUTF82C\src\dist>Main > > Traceback (most recent call last): > > File "C:\Python31\lib\site-packages\cx_Freeze\initscripts\Console3.py", > > line 27, in <module> > > exec(code, m.__dict__) > > File "Main.py", line 324, in <module> > > File "C:\Python31\lib\tkinter\__init__.py", line 1632, in __init__ > > self.tk = _tkinter.create(screenName, baseName, className, > interactive, > > wantobjects, useTk, sync > > , use) > > _tkinter.TclError: Can't find a usable init.tcl in the following > > directories: > > {D:\Programming\Workspace\PyUTF82C\src\dist\tcl} > > D:/Programming/Workspace/PyUTF82C/src/dist/tcl8 > > .5 D:/Programming/Workspace/PyUTF82C/src/lib/tcl8.5 > > D:/Programming/Workspace/PyUTF82C/src/lib/tcl8.5 > > D:/Programming/Workspace/PyUTF82C/lib/tcl8.5 > > D:/Programming/Workspace/PyUTF82C/src/library D:/Progr > > amming/Workspace/PyUTF82C/library > > D:/Programming/Workspace/PyUTF82C/tcl8.5.2/library D:/Programming/ > > Workspace/tcl8.5.2/library > > > > > > This probably means that Tcl wasn't installed properly. > > Indeed. There is a hook for properly copying over the files required > for running tcl and tk. That hook might only run properly on Unix > platforms, though, as I've never actually tested on Windows. You can > find it in cx_Freeze/hooks.py under the method load_Tkinter. If you > can tell me what works for you I'll make sure the changes are included > in the next release of cx_Freeze; otherwise, you can always look up > the files manually and then use the include_files directive to ensure > they are included in the build directory. Hope that all makes sense! > > > ------------------------------ > > I'm trying to run this Main.exe on the same machine I wrote it on, and > the > > code works. I found some previous posts where someone had similar issues > and > > Tcl8.4 wasn't included, but I noticed both tcl85.dll and tk85.dll have > been > > copied to the /dist directory. So I assume, that the tcl and tk libraries > > have been included, or partially so. > > Right. Just need a bunch of additional files that are part of the Tk > installation. See above. > > > Below is the command I used to build the exe file using cx_freeze > (following > > the brief usage doc I found on the site). I noticed the 'm's and 'P's > next > > to the file names, what do they mean? > > m is for module and P is for package. > > Anthony > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > cx-freeze-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-freeze-users > -- *Kevin Huang (黃思凱)* R&D Engineer *SMT Electronic Technology Limited, Taipei* Tel: 886-2-2808-7758 ex 6011 kev...@tw... |