Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to run an ArcGIS python script from Eclipse and get the following message:

ImportError: No module named arcgisscripting

I can run this in IDLE... any ideas?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

I received this error last week after I modified my PYTHONPATH environment variable and misspelled my path to arcgisscripting.pyd.

Correcting the PYTHONPATH to include 'c:\Program files\ArcGIS\Bin' (spelled correctly) fixed the problem.

share|improve this answer
    
To clarify, I was running from a batch file...not from eclipse. Is eclipse using a different python? what version is your ArcGIS and the IDLE you were using? –  Jay Cummins Jul 27 '10 at 16:50
1  
You might want to check your eclipse config (e.g. vogella.de/articles/Python/images/pydev06.gif) and see if you're using the right version for whichever ArcGIS you are using (wiki.gis.com/wiki/index.php/Python). –  Jay Cummins Jul 27 '10 at 16:55
    
Well, i had to update the exclipse config with the arcgis\bin path... and it's now running, really, really, slow... but it works. Wonder why it's so slow, idle is much quicker to compile. –  GuidoS Jul 29 '10 at 17:29
    
perhaps eclipse is scanning the arcgis\bin (perhaps recursively)? maybe try moving the arcgisscripting.pyd to an empty directory and updating your eclipse config? (i don't know eclipse so take my suggestions w/ a grain of salt) –  Jay Cummins Jul 29 '10 at 17:46
    
or maybe first, run procmon.exe (SysInternals goo.gl/J5nW) and see if there's anything obvious that jumps out. –  Jay Cummins Jul 29 '10 at 17:48

Make sure that when you configure eclipse, you configure that you set up the arcgis bindings, located under esri's (or arcgis) folder in program files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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