AnsweredAssumed Answered

Frozen exe crashes when importing arcpy

Question asked by wboras on Dec 7, 2016
Latest reply on Dec 19, 2016 by rastrauch



I have created a Python application that I would like to distribute within our organization. I have created a frozen exe using cx_Freeze, but the exe crashes in GeoprocessingLib.dll. I have isolated the problem to a very simple example. Here is the Python code:

import arcpy
print('Hello world!')

And here is the command to create the frozen exe:



Here are the error details from Windows Event Viewer:

Faulting application name: test.exe, version:, time stamp: 0x0001e4e4

Faulting module name: GeoprocessingLib.dll, version:, time stamp: 0x52e02880

Exception code: 0xc0000005

Fault offset: 0x00154eda

Faulting process id: 0x1804

Faulting application start time: 0x01d250b28e4a7d73

Faulting application path: Z:\lethpy-trees\lethpy\gistools\dist\test.exe

Faulting module path: C:\Users\11157\AppData\Local\Temp\_MEI50322\GeoprocessingLib.dll

Report Id: cdb968dd-bca5-11e6-82d8-3417ebaaaccc

Faulting package full name:

Faulting package-relative application ID:


I have tried both cx_Freeze and pyInstaller to create the standalone exe, but the problem is the same. We are using ArcGIS 10.1 SP1.


Any help would be appreciated.