from distutils.core import setup import py2exe setup(console=["test"], options={"py2exe":{"packages":["encodings"]}})