Thomas I am getting back to you, I clicked on this link below to look for 
hooks.py, I see it when I click on this link, but can not do anything with it.
how do you want me to open up a text editor to make this change?

From: Thomas Kluyver 
Sent: Sunday, August 21, 2016 9:15 AM
To: primary discussion list for use and development of cx_Freeze 
Subject: Re: [cx-freeze-users] Output:

I haven't seen that before, but it looks like the tkinter hook is looking for 
two environment variables to tell it where to find TCL and TK.


There's a different implementation of the hook for Python 2, which should work 
for Python 3 as well. Open up hooks.py in a text editor, and find this line:
https://bitbucket.org/anthony_tuininga/cx_freeze/src/adb1d5716a84478f3ee45c86316fb2060a8f9929/cx_Freeze/hooks.py?fileviewer=file-view-default#hooks.py-616


On that line, and again a few lines below it for 'import Tkinter', change 
Tkinter (with a capital T) to tkinter (lowercase t). The import name of the 
tkinter module changed in Python 3, so those changes should use the smarter 
hook on Python 3.


Then try freezing it again.


On 21 August 2016 at 14:06, Chester Guinyard <cguiny...@pbtcomm.net> wrote:

  Thomas this is the output:

  Microsoft Windows [Version 10.0.10586]
  (c) 2015 Microsoft Corporation. All rights reserved.

  C:\Windows\System32>cd c:\python35

  c:\Python35>setup.py built
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'built'

  c:\Python35>setup.py build
  running build
  running build_exe
  Traceback (most recent call last):
    File "C:\Python35\setup.py", line 17, in <module>
      executables = [ Executable( 'lotto.py' , base = base )])
    File "C:\Python35\lib\site-packages\cx_Freeze\dist.py", line 362, in setup
      distutils.core.setup(**attrs)
    File "C:\Python35\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "C:\Python35\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "C:\Python35\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Python35\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "C:\Python35\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "C:\Python35\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Python35\lib\site-packages\cx_Freeze\dist.py", line 232, in run
      freezer.Freeze()
    File "C:\Python35\lib\site-packages\cx_Freeze\freezer.py", line 621, in 
Freeze
      self._FreezeExecutable(executable)
    File "C:\Python35\lib\site-packages\cx_Freeze\freezer.py", line 189, in 
_FreezeExecutable
      scriptModule = finder.IncludeFile(exe.script, exe.moduleName)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 665, in 
IncludeFile
      deferredImports)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 502, in 
_LoadModule
      self._ScanCode(module.code, module, deferredImports)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 601, in 
_ScanCode
      module, relativeImportIndex)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 346, in 
_ImportModule
      deferredImports, namespace = namespace)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 436, in 
_InternalImportModule
      parentModule, namespace)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 448, in 
_LoadModule
      namespace)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 513, in 
_LoadPackage
      self._LoadModule(name, fp, path, info, deferredImports, parent)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 491, in 
_LoadModule
      self._RunHook("load", module.name, module)
    File "C:\Python35\lib\site-packages\cx_Freeze\finder.py", line 562, in 
_RunHook
      method(self, *args)
    File "C:\Python35\lib\site-packages\cx_Freeze\hooks.py", line 597, in 
load_tkinter
      tclSourceDir = os.environ["TCL_LIBRARY"]
    File "C:\Python35\lib\os.py", line 725, in __getitem__
      raise KeyError(key) from None
  KeyError: 'TCL_LIBRARY'

  c:\Python35>




  ------------------------------------------------------------------------------

  _______________________________________________
  cx-freeze-users mailing list
  cx-freeze-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/cx-freeze-users





--------------------------------------------------------------------------------
------------------------------------------------------------------------------



--------------------------------------------------------------------------------
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
------------------------------------------------------------------------------
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to