AnsweredAssumed Answered

I need help with this error

Question asked by trevor22 on Oct 21, 2014
Latest reply on Oct 21, 2014 by TJacksonesriaustralia-com-au-esridist

Traceback (most recent call last):

  File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript

    exec codeObject in __main__.__dict__

  File "E:\GEO501\Exercise07\Results\printvalues.py", line 1, in <module>

    import arcpy

ImportError: No module named arcpy

 

Here is the code:

import arcpy

from arcpy import env

env.workspace = "C:/EsriPress/Python/Data/Exercise07"

fc = "airports.shp"

cursor = arcpy.da.SearchCursor(fc, ["NAME"])

for row in cursor:

print "Airport name = {0}".format(row[0])

Outcomes