Monday 17 April 2017

python - Problems setting up eclipse (with PyDev) for ArcGIS 10


I'm trying to use eclipse with PyDev to program in python. In Windows 7 x64, I've added a PATH environmental variable (PATH C:\Python26\ArcGIS10.0\python.exe;) and what I thought were the relevant folders to PYTHONPATH (C:\Dropbox\CODE\Python\; C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy)


alt text


However, when I type the command:


import arcpy

in eclipse I get an error message. However, when I try importing ArcPy via IDLE I have no problems. Is there some way that I should be including arcpy in the build path that I am missing?



Answer



You need to add %ARCGISINSTALLDIR%\bin and %ARCGISINSALLDIR%\arcpy to your paths as well.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...