6

There may be something I'm missing, but is it possible to use the arcpy module outside arcmap?

My situation is that we have one license on a computer which is shared over a network. I need to do some basic processing and I'd like to do it via python without having to log on to the GIS computer.

Is this possible?

Is it as simple as copying the location of the arcpy module into another instance of python?

Or, can I just direct python to the directory arcpy is living in?

1
  • 5
    I'm not an expert on this, but I believe that you'll need to have access to the ArcGIS libraries for arcpy to work - in which case you'll need to have ArcGIS installed on the PC on which you're running arcpy. Further, each tool/function you run will need to be licensed, meaning that you'll need a valid license on that PC. Commented Jan 13, 2012 at 2:49

1 Answer 1

10

You can direct your .py script or interactive interpreter to the location of your arcpy installation.

This would be achieved using the sys library and an append method on your sys.path

import sys
sys.path.append("path to arcpy")

"path to arcpy" is usually:

"C:\\Program Files (x86)\\ArcGIS\\Desktop10.0\\arcpy"

However, I am not familiar with accessing this location from another computer. Someone may want to chime in and edit this answer.

More information here: http://docs.python.org/install/index.html#modifying-python-s-search-path

2
  • Great! Thanks for the input. I was baffled that I couldn't find anything on this topic, but now it makes sense that arcpy is locked up with an ESRI license...Too bad. Micheal, I wondered if that might work, but I expect I'll run into problems accessing libraries between instances of python... plus I think I'll quickly get in over my head.
    – ryan
    Commented Jan 13, 2012 at 17:03
  • 1
    This question should be marked as correct.
    – Cody Brown
    Commented Aug 24, 2012 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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