File generated with py2exe fails to run

1

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'm 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 persistence of data?

    
asked by ger 10.07.2017 в 04:58
source

1 answer

1

OK I did it with pyinstaller and it worked perfect and so I did it in the cmd

C:\Carpeta\donde\este\ubicado\pyinstaller>pyinstaller.exe --onefile C:\Carpeta\donde\este\ubicado\tuprograma.py

I went to C:\Carpeta\donde\este\ubicado\pyinstaller and the typical folders build and dist I cut them and pasted them in C:\Carpeta\donde\este\ubicado\tuprograma.py and opened the exe perfectly well (they have to do the cutting and pasting process since the add-ons such as images, etc., are still in the C:\Carpeta\donde\este\ubicado \ tuprograma.py folder otherwise it will not work)

    
answered by 10.07.2017 / 16:00
source