[Tutor] Compilation Error

Steven D'Aprano steve at pearwood.info
Sun Jun 9 06:37:34 CEST 2013


On 09/06/13 12:08, Jack Little wrote:
> 	1. I compiled a script withpy2exe.I have the .exe ,but when I run it,the window just closes itself.Inthe cmd window fromwhich I compiled the script from,Itsays some dlls are needed.Whatdoes this this have to dowithit,andmore importantly,isthere any solution?


Is the spacebar broken on your computer? You should get a new keyboard.

Also, guessing games are lots of fun when you're five, but not so much as an adult. At the moment, we have to guess what error message you are getting, what DLLs are missing, and therefore what you need to do to fix this. Please don't make us guess, show us the EXACT error message, copied and pasted from the cmd window. Don't retype it from memory, summarize it, simplify it, or paraphrase it. Copy and paste the exact wording.

I would expect that, yes, of course there is a solution. You need to provide the DLLs that py2exe just told you it needs. As for why, DLLs are software libraries. Think of them as being equivalent to Python modules, except written in some other language like C. If your script says:


import math
print math.sin(1.25)


then your script will not work without the math module. The same applies to py2exe: somewhere in it's code, it relies on one or more DLLs, and if those DLLs cannot be found, it wouldn't work.




-- 
Steven


More information about the Tutor mailing list