Hola, tengo dificultades al exportar una aplicacion grafica hecha con tkinter, pero resulta que obtengo error al exportar, seguramente se debe a que he usado muchas librerias o "packetes" que no se incluyen al exportar y como consecuencia obtengo error del exe exportado.
pueden ayudarme?.
quisiera exportar solo lo que se necesita para ejecutarlo, ya que lo exporta con un peso fenomenal.
(http://www.mediafire.com/convkey/023b/rnr88n7uq3gt9087g.jpg)
# estas son las librerias que debo incluir
from tkinter import *
from ttkthemes import themed_tk as tk
from tkinter import ttk
from belfrywidgets import ToolTip
import math
from PIL import Image, ImageTk
from cx_Freeze import setup, Executable
# <added>
import os.path
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')
# </added>
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
executables = [
Executable('nuevo - copia.py', base=base,
icon ="icono.ico")
]
# <added>
options = {
'build_exe': {'packages':["ttkthemes","belfrywidgets","math","PIL"],
'include_files':[
os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'),
os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'),
"icono.ico",
],
},
}
# </added>
setup(name = 'Inventario',
version = '0.1',
description = 'Sample cx_Freeze Tkinter script',
# <added>
options = options,
# </added>
executables = executables
)
[code=python]
Yo te recomiendo usar Pyinstaller. Yo hice un tutorial sobre como usarlo: Como compilar de .py a .exe! (usando Pyinstaller) (https://underc0de.org/foro/python/(python-3-x)-como-compilar-py-a-exe!/).
py2exe y cx_Freeze me parecen engorrosas, tienes que poner un archivo setup, en Pyinstaller no se nececita , y puedes poner tu propio manifest en .xml!
No tienes permitido ver los links.
Registrarse o Entrar a mi cuenta
Yo te recomiendo usar Pyinstaller. Yo hice un tutorial sobre como usarlo: Como compilar de .py a .exe! (usando Pyinstaller) (https://underc0de.org/foro/python/(python-3-x)-como-compilar-py-a-exe!/).
py2exe y cx_Freeze me parecen engorrosas, tienes que poner un archivo setup, en Pyinstaller no se nececita , y puedes poner tu propio manifest en .xml!
Esta excelente, si quisiera añadir: puede ser el autor o su pagina web, como haria?, y otra, se compila con todas las librerias que has usado?