Fix: Error on py2exe script when wxpython version changes

When you change the version of the wxpython and then rebuild the py2exe script you made, there were some errors that shows up and that it cant be compiled to exe as expected. When this happen,  you need to check  your “build” folder.

And then on the  at the beginning of setup.py, type the following:

# cleanup dist and build directory first (for new py2exe version)
if os.path.exists(“dist/prog”):
shutil.rmtree(“dist/prog”)

if os.path.exists(“dist/lib”):
shutil.rmtree(“dist/lib”)

if os.path.exists(“build”):
shutil.rmtree(“build”)

This should fix the problem you have.

Leave a Reply

Your email address will not be published. Required fields are marked *