1

I have gotten arcpy to work in spyder by copying the arcpy folder from C:\Program Files (x86)\ArcGIS\Desktop10.5 to C:\tmp\anaconda\Lib\site-packages.

However, when I run from arcpy import env I get this error:

ImportError: cannot import name 'env' from 'arcpy' (unknown location). 

I've gotten this all to work on another machine before, but things are not working this time around. Has anyone ran into the arcpy working but env not working in spyder?

I've read several posts I found online on how to get spyder to play nicely with arcpy, but have not been successful. I've also tried to change the python interpreter path to C:\Python27\ArcGIS10.5\python.exe, but I get a warning saying:

You selected a Python 2 interpreter for the console but Spyder is running on Python 3

Arcpy will not run from C:\Python27\ArcGIS10.5\python.exe. I downloaded the 32-bit and 64-bit and neither worked.

Here are links to other posts with solutions I've tried that have not worked.

Ralf
  • 16,086
  • 4
  • 44
  • 68
jheyer
  • 31
  • 2

0 Answers0