[GIS] arcpy DLL load failed in standalone script

64bitarcpyimporterrorpythonpython-2.7

I have python 2.7 x64 bit and I have ARCGIS 10.5 x32 bit on windows 10.

I try to build standalone arcpy scripts but I take all time :

ImportError: DLL load failed: % is not a valid Win32 application.

where I want to import arcpy.

that error is because I have python 64 bit and ARCGIS 32 Bit.

but it possible to install arcpy x64 bit(or ARCGIS 10+ 64 bit with arcpy 64 bit) with the some way ?

Best Answer

You can install 64-bit Background Geoprocessing. This will install the 64-bit python, and a version of arcpy that will run with the 64-bit python.

Note that not all arcpy tools work in 64-bit:

Unsupported tools

Tools that do not run in the background include the following:

  • Tools inside the Metadata conversion toolset
  • Tools inside the Geodatabase administration toolset
  • All Coverage tools
  • Tools which create packages
  • Graphing tools (64-bit geoprocessing only; these tools work in traditional 32-bit background processing)
  • Data Reviewer tools (64-bit geoprocessing only; these tools work in traditional 32-bit background processing)
  • Custom script, model, or function tools where the author has disabled background processing

You can check the General tab of the tool properties for the Always run in foreground check box to see if a tool is capable of running in the background.

64-bit Background Geoprocessing can be installed from the ArcGIS install media, or downloaded from the My Esri portal.

For more info see Background Geoprocessing (64-bit)

Related Question