AnsweredAssumed Answered

32-bit and 64-bit Python 2.7 on the same machine

Question asked by crdale on Sep 13, 2012
Latest reply on Sep 18, 2012 by cfox-esristaff
Hello all,

I have installed on a Windows Server 2008 R2 virtual machine ArcGIS for Desktop 10.1 and ArcGIS for Server 10.1.  The desktop install came with the 32-bit version of Python 2.7, and the server install came with the 64-bit version.  I seem to now have a conflict between both versions when I try to work with Python on ArcGIS for Desktop.  I've run into this before with Desktop when I had two different versions of Python on my computer, and the way that I solved it was to keep one and uninstall the other.  In this case, I feel like I wouldn't be able to uninstall either of them, since both pieces of software probably rely on arcpy for certain functions.

Here's the error I get when I try to run my script in the shell and it initially tries to import the arcpy module:

Traceback (most recent call last):
  File "C:\Projects\11047\DATARE~1\Toolbox.pyt", line 1, in <module>
    import arcpy
  File "c:\program files (x86)\arcgis\desktop10.1\ArcPy\arcpy\__init__.py", line 21, in <module>
    from arcpy.geoprocessing import gp
  File "c:\program files (x86)\arcgis\desktop10.1\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
    from _base import *
  File "c:\program files (x86)\arcgis\desktop10.1\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
    import arcgisscripting
ImportError: DLL load failed: %1 is not a valid Win32 application.

Has anyone else come across this problem?  I think I need to change the version that my Python Shell is using, since at the top of the window it says 64 bit (AMD64), but since I'm developing in Desktop, it should probably be 32 bit (Intel 32).  I was able to develop my script, and then today I started to run into this error.

Thanks!

Outcomes