Can't import arcpy to PythonWin, can I just use IDLE instead?
I've been trying to download and work with arcpy on PythonWin for the last week but it keeps either saying "Can't find win32" or if it opens, it can't find arcpy and I can't import it.
Since IDLE is automatically included with ArcGIS, can I just use IDLE for my code editing (in addition to the internal ArcGIS Python shell) and not bother with PythonWin?
Posted Jan 4, 2017, 11:48 PM UTC
23
Yes, you can just use IDLE; I do it all the time.
That being said, it sounds like PythonWin was installed into a different Python installation location than what Arc uses. Arc installs its Python into C:\Python27\ArcGIS10.4\ (depending on version); standard Python installs go into the plain C:\Python27 folder.
When you use IDLE; make sure you use the shortcut installed by Arc, otherwise you'll have trouble importing again.
So I can just move the PythonWin folder from Python27\x to Python27\ArcGIS10.5\x and it'll work?
No, you'll probably need to reinstall it. Make sure to select the Arc Python installation, or, if you're installing using pip, run the pip that's in C:\Python27\ArcGIS10.5\Scripts