0

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 ?

  • 1
    You are right, it's a 64/32 bit problem. The bad news is that ArcGIS is still (mostly) a 32bit platform, you must use 32bit python. There is a few 'how to' on 64bit python like blogs.esri.com/esri/arcgis/2012/11/12/… and desktop.arcgis.com/en/arcmap/10.3/analyze/executing-tools/… but, from memory, not the full suite of commands are available. You might have more luck with ArcGIS Pro, but from my readings on the subject it's no more 64bit than Desktop. – Michael Stimson Oct 8 '17 at 21:41
  • @Michael Stimson yes thx you for helping I need test it now...I have build many scripts in python 2.7 64 bit I scary to change now . – Chris Papas Oct 8 '17 at 22:32
6

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)

  • what you mean : Custom script, model, or function tools where the author has disabled background processing I cant use model builder to help me like model to python script ? or what you mean Custom script ?if I cant use my scripts is useless.do you have test it ? – Chris Papas Oct 8 '17 at 22:20
  • 1
    @ChrisPapas Have you disabled background geoprocessing? That bullet point reads "Custom script, model, or function tools where the author has disabled background processing". If you haven't disabled background geoprocessing then the 64bit arcpy should work fine. Yes I have tested it, almost all my arcpy scripts (hundreds of them) run using 64bit arcpy. The only ones that don't (very few) are the ones that make use of the unsupported tools above. – Midavalo Oct 8 '17 at 22:23
  • @ChrisPapas I suggest you install it and try it. I think you'll find your arcpy scripts will just work using 64bit python after you install it. – Midavalo Oct 8 '17 at 22:25
  • 1
    @ChrisPapas Like I said, give it a try. Build something in Model Builder and export it then try running that in 64-bit arcpy. That said, instead of Model Builder, try just running each tool from ArcToolbox, then from the "Results" pane right-click and export as python snippet. I find the python exported as snippet often is better and tidier than what you get from Model Builder. – Midavalo Oct 8 '17 at 22:37
  • 2
    @ChrisPapas The best way to say "thanks" on Stack Exchange is to upvote and accept a correct answer. See What should I do when someone answers my question? – Midavalo Oct 10 '17 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.