1

I am trying to package a python application on my 64 bit windows 7 machine using py2exe. The final target of this application are 32 bit windows machines.

I am using 32 bit python 2.7 on the 64 bit windows 7 machine. When I package the application , py2exe warns me of several DLLs from the system32 directory that need to be packaged .

The built exe now fails to run on the destination machines : windows XP (32 bit) and windows Vista (32 bit) with the message saying C:\myapp\bin\WS2_32.dll is corrupted and I need to check it against the Windows installation.

Checking : WIndows 7 64 bit : system32 directory WS2_32.dll has size 290kb Windows XP 32 bit : system directory has size 80 kb

My question is , can I build a XP/Vista 32 bit application using py2exe from Windows 7 given these differences in DLL size.

I also tried replacing the C:\myapp\bin\WS2_32.dll with the XP DLL..but this time the application didnt launch.

harijay
  • 11,303
  • 12
  • 38
  • 52
  • see some other answers on the same topic: http://stackoverflow.com/questions/6378673/executable-made-with-py2exe-doesnt-run-on-windows-xp-32bit – tovmeod Feb 13 '12 at 23:12

1 Answers1

1

py2exe tells you:

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.

WS2_32.dll is part of the operating system.

Janne Karila
  • 24,266
  • 6
  • 53
  • 94
  • Once I packaged without the dlls that py2exe warned in the end of its build output (the ones from the system32 folder). The application worked just great on Windows XP 32 bit. I am sure it will also work on Vista 32 bit. ..Thanks – harijay Jan 27 '12 at 23:01