I am using ArcMap 10.6.1 and am trying to install and use pythonwin but i am not having much luck. What version of pythonwin should i be using and what version of python? When i try to enter import arcpy i get an error saying that module does not work. I am using pywin32-217.win32-py2.7.exe.
If i did not provide enough information please let me know. I just started learning python scripting for ArcGIS
You need the version for python 2.7.
You also have to use ArcMap's python interpreter... It sounds like you have a disconnect between the two
import sys sys.executable
what does that report? and is it to the python that arcmp uses?
o you don't see something like this ?? (I can run pythonwin form ArcGIS pro, so the first part of the path isn't relevant... only the portion from … site-packages onwards is key
If memory serves, python for arcmap is installed in c:\python(version number etc)
How do you use ArcMap's python interpreter? Right now i instatlled Python 2.7 and pywin 32 build 214. I tried the following code and get these errors. How do you get pythonwin to work with a current GIS document?
I haven't used arcmap in ages, but if memory serves there should be a
C:\pythonxx\ folder on you computer followed by something like arcmapxx.
pythonwin has to be installed in the site-packages folder in that path.
I suspect that you might have more than one python 2.7... uninstall one of them would be my recommendation and use the python that is installed in the aforementioned path.
So crankup File Explorer and see if you can locate in the root directory of C or in C:\Program Files