I have the following code:
''' Archivo: setup.py '''
# -*- coding: utf-8 -*-
from distutils.core import setup
import py2exe
setup(name="Ejemplo",
version="1.0",
author="autor",
author_email="email del autor",
url="url del proyecto",
scripts=["Imagen2.py"],
console=["Imagen2.py"],
options={"py2exe": {"bundle_files": 1}},
zipfile=None,
)
I am trying to create an executable using py2exe with the following command:
C:directorio/ubicación/del/script>py2exe setup.py
But when I run the file, I get the following error:
This is a link to the program I'm working with:
How to show a different image in each execution of my interface through data persistence?
OK I did it with pyinstaller and it worked perfect and so I did it in the cmd
I went to
C:\Carpeta\donde\este\ubicado\pyinstaller
and the typical foldersbuild
anddist
cut and pasted them inC:\Carpeta\donde\este\ubicado\tuprograma.py
and opened the exe perfectly fine (you have to do the cut and paste process as plugins like images etc are still in theC:\Carpeta\donde\este\ubicado
\yourprogram.py folder otherwise it will not work)