Error al hacer python setup.py py2exe

627 views
Skip to first unread message

Mauricio Demonte

unread,
Mar 19, 2015, 10:57:52 PM3/19/15
to pyaf...@googlegroups.com
Gente, luego de instalar todo lo necesario para analizar y generar las librerias en HOMO, al hacer python setup.py py2exe, surgieron los siguientes errores que "pude corregir"

 1)  No encontraba ssleay32.dll, la bajé de la Web, la copie en C:\Python27\Lib\site-packages\M2Crypto y lo volví a compilar y saltó esto nuevo error

 2) No encontraba libeay32.dll, la bajé de la Web, la copia en C:\Python27\Lib\site-packages\M2Crypto y lo volví a compilar y saltó esto nuevo error

 3) No encontraba logo.png, hice un PNG y lo copie en c:\pyafipws-master\plantillas y lo volví a compilar y al final aparece esto que señala los módulos que no están presentes...


The following modules appear to be missing
['Carbon', 'Carbon.Files', 'ICCProfile', '_imaging_gif', '_imagingagg', '_pybsddb', '_scproxy', '_sysconfigdata', 'bsddb3.dbutils', 'ca_certs_locater', 'dbf', 'email.FeedParser', 'email.Message', 'email.Utils', 'formato_txt', 'google.appengine.api', 'google.appengine.api.urlfetch', 'google3.apphosting.api', 'google3.apphosting.api.urlfetch', 'hexdump', 'html.parser', 'pycurl', 'simplejson', 'socks', 'urllib.request', 'win32com.shell', 'win32com.shell.shell']

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.

   OLEAUT32.dll - C:\WINDOWS\system32\OLEAUT32.dll
   USER32.dll - C:\WINDOWS\system32\USER32.dll
   SHELL32.dll - C:\WINDOWS\system32\SHELL32.dll
   ole32.dll - C:\WINDOWS\system32\ole32.dll
   ADVAPI32.dll - C:\WINDOWS\system32\ADVAPI32.dll
   WS2_32.dll - C:\WINDOWS\system32\WS2_32.dll
   GDI32.dll - C:\WINDOWS\system32\GDI32.dll
   VERSION.dll - C:\WINDOWS\system32\VERSION.dll
   KERNEL32.dll - C:\WINDOWS\system32\KERNEL32.dll
*** creating the nsis script***
*** compiling the nsis script***

Y en el MakeNSISW, en el log aparece:
StrCmp "$0" "Microsoft Visual C++ 2008 Redistributable - x86 9.0.21022" equal=vcredist_ok, nonequal=vcredist_install
File: "vcredist_x86.exe" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
   /oname=outfile one_file_only)
Error in script "C:\pyafipws-master\base.nsi" on line 69 -- aborting creation process

Adjunto el base.nsi

MIS CONSULTAS:
¿Esta bien lo de los módulos que no esncuentra (['Carbon', 'Carbon.Files', 'ICCProfile', '_imaging_gif', '_imagingagg', '_pybsddb', '_scproxy', '_sysconfigdata', 'bsddb3.dbutils', 'ca_certs_locater', 'dbf', 'email.FeedParser', 'email.Message', 'email.Utils', 'formato_txt', 'google.appengine.api', 'google.appengine.api.urlfetch', 'google3.apphosting.api', 'google3.apphosting.api.urlfetch', 'hexdump', 'html.parser', 'pycurl', 'simplejson', 'socks', 'urllib.request', 'win32com.shell', 'win32com.shell.shell'])?

Como soluciono el problema del MakeNSISW???

Yo sólo voy a usar el módulo WSAA y el WSFEv1, ¿cómo hago para generar los instaladores de esos dos webservice? 



Desde ya muchas gracias.
Saludos.,
Mauricio.

base.nsi

Mariano Reingart

unread,
Mar 21, 2015, 1:13:55 PM3/21/15
to pyaf...@googlegroups.com
2015-03-19 23:57 GMT-03:00 Mauricio Demonte <mjde...@gmail.com>:
Gente, luego de instalar todo lo necesario para analizar y generar las librerias en HOMO, al hacer python setup.py py2exe, surgieron los siguientes errores que "pude corregir"


Si está todo instalado correctamente, no deberías tener errores y se debería generar el instalador sin mayores inconvenientes.
 
 1)  No encontraba ssleay32.dll, la bajé de la Web, la copie en C:\Python27\Lib\site-packages\M2Crypto y lo volví a compilar y saltó esto nuevo error


En general esta es una DLL de OpenSSL y por defecto se instala en el directorio System de Windows (salvo que hayas cambiado algo en la instalación):

Z:\pyafipws>dir c:\windows\ssleay32.dll /s
 Directorio de c:\windows\System32
15/01/2015  06:38 p.m.           274.432 ssleay32.dll

 2) No encontraba libeay32.dll, la bajé de la Web, la copia en C:\Python27\Lib\site-packages\M2Crypto y lo volví a compilar y saltó esto nuevo error


Idem:

Z:\pyafipws>dir c:\windows\libeay32.dll /s
 Directorio de c:\windows\System32
15/01/2015  06:37 p.m.         1.179.648 libeay32.dll


A mi no me aparece ningún error referido a este tema, nuevamente me parece que tenes un conflicto de librerías de Windows ("DLL HELL").
En mi caso, el instalador lo encuentra y copia directamente al paquete compilado:
*** copy dlls ***
copying C:\WINDOWS\system32\SSLEAY32.dll -> Z:\pyafipws\dist
copying C:\WINDOWS\system32\LIBEAY32.dll -> Z:\pyafipws\dist


 3) No encontraba logo.png, hice un PNG y lo copie en c:\pyafipws-master\plantillas y lo volví a compilar y al final aparece esto que señala los módulos que no están presentes...

The following modules appear to be missing
['Carbon', 'Carbon.Files', 'ICCProfile', '_imaging_gif', '_imagingagg', '_pybsddb', '_scproxy', '_sysconfigdata', 'bsddb3.dbutils', 'ca_certs_locater', 'dbf', 'email.FeedParser', 'email.Message', 'email.Utils', 'formato_txt', 'google.appengine.api', 'google.appengine.api.urlfetch', 'google3.apphosting.api', 'google3.apphosting.api.urlfetch', 'hexdump', 'html.parser', 'pycurl', 'simplejson', 'socks', 'urllib.request', 'win32com.shell', 'win32com.shell.shell']


En general algunos de estos módulos no se utilizan y yo no he encontrado este tipo de problemas .
Depende de como lo compiles y como lo utilizes, si necesitas incluirlos a la fuerza, podes agregarlos en la lista includes (setup.py linea 119)
 
 
*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.

   OLEAUT32.dll - C:\WINDOWS\system32\OLEAUT32.dll
   USER32.dll - C:\WINDOWS\system32\USER32.dll
   SHELL32.dll - C:\WINDOWS\system32\SHELL32.dll
   ole32.dll - C:\WINDOWS\system32\ole32.dll
   ADVAPI32.dll - C:\WINDOWS\system32\ADVAPI32.dll
   WS2_32.dll - C:\WINDOWS\system32\WS2_32.dll
   GDI32.dll - C:\WINDOWS\system32\GDI32.dll
   VERSION.dll - C:\WINDOWS\system32\VERSION.dll
   KERNEL32.dll - C:\WINDOWS\system32\KERNEL32.dll
*** creating the nsis script***
*** compiling the nsis script***


Esto es normal, no puede incluir bibliotecas de Windows.
 
Y en el MakeNSISW, en el log aparece:
StrCmp "$0" "Microsoft Visual C++ 2008 Redistributable - x86 9.0.21022" equal=vcredist_ok, nonequal=vcredist_install
File: "vcredist_x86.exe" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
   /oname=outfile one_file_only)
Error in script "C:\pyafipws-master\base.nsi" on line 69 -- aborting creation process

Adjunto el base.nsi


No encuentra el redistribuible vcredist_x86.exe para incluirlo en el instalador, podrías descargarlo del sitio de MS buscando  "Microsoft Visual C++ 2008 Redistributable - x86 9.0.21022" (que es el que corresponde para esta versión de Python), o podes instalarte mercurial y te tomaría las DLL que se redistribuyen automáticamente:


MIS CONSULTAS:
¿Esta bien lo de los módulos que no esncuentra (['Carbon', 'Carbon.Files', 'ICCProfile', '_imaging_gif', '_imagingagg', '_pybsddb', '_scproxy', '_sysconfigdata', 'bsddb3.dbutils', 'ca_certs_locater', 'dbf', 'email.FeedParser', 'email.Message', 'email.Utils', 'formato_txt', 'google.appengine.api', 'google.appengine.api.urlfetch', 'google3.apphosting.api', 'google3.apphosting.api.urlfetch', 'hexdump', 'html.parser', 'pycurl', 'simplejson', 'socks', 'urllib.request', 'win32com.shell', 'win32com.shell.shell'])?


Posiblemente no tengas problemas, ver arriba la contestación detallada.
 
Como soluciono el problema del MakeNSISW???

Ver arriba. Igualmente en el setup.py esta comentado donde busca el Microsoft.VC90.CRT.manifest.
Incluso podes borrar toda la órdenes para "install_vcredist" en nsis.py, e instalarlo por separado.
 
Yo sólo voy a usar el módulo WSAA y el WSFEv1, ¿cómo hago para generar los instaladores de esos dos webservice? 


En el setup.py dejas import wsaa, import wsfev1, y comentas el resto de los imports, solo te compila los modulos importados.

Sds
 

Pablo Hachmann

unread,
Mar 30, 2015, 9:07:41 PM3/30/15
to pyaf...@googlegroups.com
Hola Mauricio

tenia los mismos problemas que vos (lo del logo y lo de File: "vcredist_x86.exe" -> no files found.)
copie un logo cualquiera, como vos y por el otro error, en el setup.py cambie el path del mercurial , donde decia c:\Program files por c:\Archivos de programa
que es donde lo tengo instalado (windows version español) y con eso se soluciono

Saludod
Pablo
Reply all
Reply to author
Forward
0 new messages