Traceback (most recent call last): File "redrover-hazus.py", line 66, in <module> File "zipextimporter.pyo", line 82, in load_module File "arcpy\__init__.pyo", line 17, in <module> File "zipextimporter.pyo", line 82, in load_module File "arcpy\geoprocessing\__init__.pyo", line 14, in <module> File "zipextimporter.pyo", line 82, in load_module File "arcpy\geoprocessing\_base.pyo", line 14, in <module> File "zipextimporter.pyo", line 98, in load_module ImportError: MemoryLoadLibrary failed loading arcgisscripting.pyd
from distutils.core import setup import py2exe, sys, os  data_files = ["file1", "file2"]   sys.argv.append('py2exe')  setup(     windows = [{'script': "script.py",'icon_resources':[(1,"icon.ico")]}],     zipfile = None,     data_files=data_files,     options = {'py2exe':                  {                  'includes': "arcgisscripting",                  'bundle_files': 1,                  'dist_dir': "dist",                  'optimize': 2,                 }               }, )Solved! Go to Solution.
I'm trying to build an exe using py2exe.
See this thread
Re: ArcGIS 10.1 python script to exe is not working (updated link)
I suppose the main question is - why are you using py2exe? If someone has ArcGIS installed, they will have Python installed as well. If you are trying to hide your code you can b-code compile it (pyc).
You cannot compile a python script importing arcpy into an exe.
If this is not possible, are there other options that would help me distribute the set of scripts and non-arcpy modules that the user needs to run it?