[GIS] Using ArcPy module in python shell that is not with ArcGIS

64bitarcgis-10.2arcpyinstallation

I have ArcGIS 10.2 installed on my machine. When ArcGIS was installed, python 2.7.3(32 bits) was also installed. I need python 2.7.5 64bits for some gdal functions. So I installed python 2.7.5 64bits stand alone. Now there are two python installed with two python shells. One (2.7.3 32bits) can be started from Start—->All Programs—>Python27—>IDLE(GUI). The other(2.7.5 64bits) is from Start—->All Programs—>ArcGIS—>Python27—>IDLE(GUI).

Till now I have my work done in python2.7.5 64bits. Now I want to integrate a model I built in Modelbuilder ArcGIS 10.2. I export this model to python script so that I can see the code behind. I need to import ArcPy module to use ArcPy functions. I tried several ways but no good luck.

Is there any way that I can import arcpy module in this python shell (2.7.5 64bits, not the one installed with ArcGIS)?

Should I install arcpy package first, like what I did for other module? But I didn't see where to download it.


Finally it is resolved. I followed Is 64-bit background geoprocessing native to ArcGIS 10.2? and asked our IT staff to download the package and installed for me. Now my python (came with ArcGIS) is 2.7.5 64bit. I also uninstalled the stand alone python. Re-install all the modules.

Best Answer

You'll need to get a 64 bit ArcGIS installation of some sort to get arcpy to work correctly in a 64 bit installation. The most expedient thing would be to install 64 bit background geoprocessing for your current install of ArcGIS. That will install a 64 bit version of all the necessary Python libraries needed to use arcpy.