Windows Server cannot run the py2exe application created

A simple python script should run on a Windows server without installing python.

I used py2exe, which generated a healthy dist subdirectory, with script.exe, which works fine on the local machine.
However, when I run it on a server (Windows Server 2003 R2), it produces this:
The system cannot execute the specified program.

and ERRORLEVEL - 9020.

Any ideas?

+5
source share
4 answers

I did not find the cause of the problem, but using python 2.5 with py2exe on the same script worked fine on the server.

I think something is wrong with py2exe under 2.6.

+1
source

py2exe , DLL Microsoft C .

Python2.6 MSVCR90.dll 9.0.21022.8, Microsoft Visual ++ 2008:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en

, SP1 DLL .

, py2exe, : http://www.py2exe.org/index.cgi/Tutorial#Step5

+6

DLL. depend.exe, , . , msvc-something-something.dll

+2

Because Python 2.6 is built against Visual Studio 2008, the target computer must also have the Visual Studio 2008 libraries available from the Visual C ++ 2008 Redistributable package .

I confirmed that with a clean build of Windows XP or Server 2003 (none of which has a Visual Studio 2008 redistributable), the Python 2.6 py2exe executable will fail with the aforementioned error, but after installing the redistributable package the executable is executed in normal mode.

+1
source

All Articles