cx_freeze
не собирает мой .py
файл в .exe
и выдает ошибку:
running build
running build_exe
Traceback (most recent call last):
File "C:\Users\Sold\Desktop\py\build.py", line 17, in <module>
options = {"build_exe": build_exe_options}
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\dist.py", line 349, in setup
distutils.core.setup(**attrs)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36 \lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36 \lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36 \lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36 \lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36 \lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36 \lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\dist.py", line 219, in run
freezer.Freeze()
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\freezer.py", line 616, in Freeze
self.finder = self._GetModuleFinder()
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\freezer.py", line 340, in _GetModuleFinder
finder.IncludeModule(name)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\finder.py", line 651, in IncludeModule
namespace = namespace)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\finder.py", line 311, in _ImportModule
deferredImports, namespace = namespace)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\finder.py", line 404, in _InternalImportModule
parentModule, namespace)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\finder.py", line 417, in _LoadModule
namespace)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\finder.py", line 486, in _LoadPackage
self._LoadModule(name, fp, path, info, deferredImports, parent)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\finder.py", line 464, in _LoadModule
self._RunHook("load", module.name, module)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\finder.py", line 537, in _RunHook
method(self, *args)
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\site- packages\cx_Freeze\hooks.py", line 615, in load_tkinter
tclSourceDir = os.environ["TCL_LIBRARY"]
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36\lib\os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'TCL_LIBRARY'
Обновление вопроса
Теперь возникает ошибка
File "C:\Users\Sold\AppData\Local\Programs\Python\Python36 \lib\tkinter_init_.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: DLL load failed: Не найден указанный модуль.