Python Shell 64-bit

1372
3
Jump to solution
12-04-2017 10:34 AM
DaneStephenson
New Contributor II

Is there a way to force the IDLE Shell installed with ArcGIS to use the 64-bit processing over the 32-bit processing?  I have the 64-bit background geoprocessing extension installed. 

I need to be sure that the script tool that I have written will run in the 64-bit background geoprocessing and the IDLE Shell is nice to run scripts you are testing in since it stays open after execution and will display errors.  I have a script tool that will execute in 32-bit.  I have modified it to include a portion that executes an FME Workspace.  It will run everything up unto the FME Workspace execution.  I get an ImportError stating that it is not a valid 32-bit application.  I assume this means that it wants to run the workspace in 64-bit.  I would prefer to run the tool in the background anyway.  However, when I uncheck the "Always run in the foreground" option on the script tool properties and run it, it fails immediately and does not complete any of the portion it did while running in the foreground.

Any help would be greatly appreciated.  Thank you in advance.

0 Kudos
1 Solution

Accepted Solutions
DaneStephenson
New Contributor II

So, as a work around for now, I have been executing the script directly from the CMD line and specifying which Python executable to use.

>>"C:\Python27\ArcGISx6410.5\python.exe" "MyScript.py"

The command window remains open after executing and displays any of the error messages.  This has allowed me to troubleshoot any issues with the code and it now runs through in the background processing the same as it did in the foreground.  Now I just have to solve an issue with the FME Workspace kicking off and I think I will have it.

Thank you all for your suggestions.  I would still be interested in finding a way to force Esri's installation of IDLE to use the 64-bit processing.  But, I suppose I have my current problem solved for now.

View solution in original post

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

since no one has leapt in... can you do it in Pro?

0 Kudos
DaneStephenson
New Contributor II

No, I do not have Pro as an option.  I apologize.  I suppose that I should have detailed, that I am using ArcGIS10.5 and the 64-bit Background Geoprossesing is installed along with the default Python 2.7 installed with ArcGIS.  I wrote the script for the script tool using NotePad++ and added it to a toolbox in ArcCatalog.  The tool creates a folder by copying it and its contents (a GDB, Layers, and an MXD) and renames everything accordingly based on 3 User Parameters.  It also copies any additional specified files to the folder and places it where the User specifies.  Then it repairs the sources for the Layers in the MXD to be the Feature Classes and Tables in the New GDB.

I am trying to follow that up with launching a FME Workspace and passing the User Parameters and resulting GDB as parameters for the Workspace.

I think the whole problem hinges on the fact that FME is 64-bit and wants to be ran that way.  The processing of the Script Tool from ArcCatalog is run in the foreground and is 32-bit.  If I could get the script running and ensure that it runs error free in 64-bit processing, then I could change the tool to run in background processing.

Hence why I would like to find a way to run/test the script in IDLE using 64-bit processing.  There has to be a way to force this.

0 Kudos
DaneStephenson
New Contributor II

So, as a work around for now, I have been executing the script directly from the CMD line and specifying which Python executable to use.

>>"C:\Python27\ArcGISx6410.5\python.exe" "MyScript.py"

The command window remains open after executing and displays any of the error messages.  This has allowed me to troubleshoot any issues with the code and it now runs through in the background processing the same as it did in the foreground.  Now I just have to solve an issue with the FME Workspace kicking off and I think I will have it.

Thank you all for your suggestions.  I would still be interested in finding a way to force Esri's installation of IDLE to use the 64-bit processing.  But, I suppose I have my current problem solved for now.

0 Kudos