I have a netbook with windows 7 starter and when ever I try to run my setup.py, I get either of these errors with their corresponding changes:
console = [{"script":"FileName.py"}]
It won't open.
windows = [{"script":"FileName.py"}]
It immediately stops working.
My program has a GUI. It just seems that every setup.py variation I try doesn't work. Any ideas?
Right now it looks like:
#### no arguments
if len(sys.argv) == 1:
sys.argv.append("py2exe")
####creates a standalone .exe file, no zip files
setup( options = {"py2exe": {"compressed": 1, "optimize": 2, "ascii": 1, "bundle_files": 1}},
zipfile = None,
# replace myFile.py with your own code filename here ...
console = [{"script": 'MyFile.py'}] )
Any and all help is appreciated.
Your setup.py script worked for me on my Windows 7 Professional VM. Tried it with both a simple console script and a wxPython gui script.
It is not in your example (and I'm assuming you have this), but you'd need the following imports in your setup:
import sys
from setuptools import setup # or from distutils.core import setup
import py2exe
Other than that, is your MyFile.py in the same directory as your setup.py? Does your MyFile.py run on its own?