A simple python script needs to run on a windows server with no python installed.
I used py2exe, which generated a healthy dist subdirectory, with script.exe that runs fine on the local machine.
However, when I run it on the server (Windows Server 2003 R2), it produces this:
The system cannot execute the specified program.
and ERRORLEVEL is 9020.
Any ideas?
For py2exe to work, you have to include the correct version of the Microsoft C runtime DLL with your application.
For Python2.6, this is MSVCR90.dll version 9.0.21022.8, which can be obtained from the Microsoft Visual C++ 2008 Redistributable Package:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
NOTE that the SP1 of this installer contains a different version of the DLL, and will not work.
I spent a while earlier this year explaining this carefully in the py2exe tutorial, so I'll just link to that: http://www.py2exe.org/index.cgi/Tutorial#Step5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With