I\'m trying to convert a simple Python script into a Windows executable. My setup.py script is:
from distutils.core import setup
import py2exe
setup(
name =
I had a different problem with py2exe failing to find pywintypes27.dll - it was failing to find the file inside build_exe.isSystemDLL. The solution is to add the location of the DLLs in the path (at least the hack is to do so):
import site
for site_path in site.getsitepackages():
pywin32_path = os.path.join(site_path, "pywin32_system32")
if os.path.isdir(pywin32_path):
os.environ["PATH"] = os.environ["PATH"] + ";" + pywin32_path