I'm still new to Python and py2exe. I've created an executable from py2exe, but when I开发者_开发技巧 try to copy the single .executable from the "dist" folder it was created in, and paste it else where (let's say my desktop), When I open the executable after it's moved from the folder it opens quickly disappears (it's a console application). The program has several input/output, so this should not be the case. Its DOES function correctly if I leave it the original "dist" folder.
Is there something I'm missing? What do I need to do if I just want to take the single file (.exe) and put it on a different machine (that doesn't have Python installed) and get it to run correctly?
Thanks in advance!
In the dist directory is there a set of .dll files needed to run the exe file.
As others said, you need the .dll files to run the program. It works however if you leave the program in the dist folder (or create a copy of dist) and create a shortcut. You can move the shortcut wherever you like and it will work, since the file itself is still in the folder with the .dlls.
Put your dist folder into the system search path, and it should work fine. This happened to me also in times past.
精彩评论