I am new to Python. I am trying to create executable file with cx_freeze but after the file is created the exe cannot be started. I am getting following error:
I am using pytone 3.6.0
Code
import sys
import os
os.environ['TCL_LIBRARY'] = "C:\\Users\\Valeri\\AppData\\Local\\Programs\\Python\\Python36-32\\tcl\\tcl8.6"
os.environ['TK_LIBRARY'] = "C:\\Users\\Valeri\\AppData\\Local\\Programs\\Python\\Python36-32\\tcl\\tk8.6"
from cx_Freeze import setup, Executable
# replaces commandline arg 'build'
sys.argv.append("build")
# change the filename to your program file --->
filename = "SolutionGenerator.py"
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup(
name = "Circle",
version = "1.0",
description = "cx_Freeze Tkinter script",
executables = [Executable(filename, base=base)])
setup.py
import sys import os os.environ['TCL_LIBRARY'] = "C:\\Users\\Valeri\\AppData\\Local\\Programs\\Python\\Python36-32\\tcl\\tcl8.6" os.environ['TK_LIBRARY'] = "C:\\Users\\Valeri\\AppData\\Local\\Programs\\Python\\Python36-32\\tcl\\tk8.6" from cx_Freeze import setup, Executable "SolutionGenerator.py" base = None if sys.platform == "win32":
base = "Win32GUI" setup(
name = "Circle",
version = "1.0",
description = "cx_Freeze Tkinter script",
executables = [Executable(filename, base=base)])
I tried everything i found in internet but cannot get this exe working. Is there other possibilities to create exe from py in Python 3.6?