0

I compiled a script with py2exe. I have the .exe, but when I run it, the window just closes itself. In the cmd window from which I compiled the script from, It says some dlls are needed. What does this this have to do with it, and more importantly, is there any solution?

Edited by pyTony: Removed incorrect code formatting (indent)

2
Contributors
1
Reply
23
Views
4 Years
Discussion Span
Last Post by tony75
1

Hi
You must put setup.py and yourScripit.py in the same place or folder.

#This is setup.py
from distutils.core import setup
import py2exe
setup(console=['yourScript.py'])

I like to convert via pyinstaller
http://www.pyinstaller.org/
Put pyinstaller in python27 folder then you can put your script in pyinstaller and run this commands
Let’s say your script is shell.py,so you can convet shell.py to shell.exe like this..

1.C:\Python27\pyinstaller-1.5.1>python Configure.py
2.C:\Python27\pyinstaller-1.5.1>python Makespec.py --onefile --noconsole shell.py
3.C:\Python27\pyinstaller-1.5.1>python Build.py shell\shell.spec

You can see vegaseat script also

http://www.daniweb.com/software-development/python/threads/456068/is-there-a-program-to-build-a-.py-to-.exe

Edited by tony75

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.