PythonWin not in ArcGIS install directory

5857
7
06-05-2012 12:18 PM
SamanthaM
New Contributor
I am using ArcGIS 10. I am beginning some tutorials to learn Arcpy. The ArcGIS 10 install already installed python26 file directory (as shown in the screen shot below).

In my case C:\Python26\ArcGIS10.0\Lib\site-packages\ does not contain a pythonwin subfolder nor an executable for it.


[ATTACH=CONFIG]14961[/ATTACH]
0 Kudos
7 Replies
by Anonymous User
Not applicable
Original User: Stringtheory

Samantha,

To be clear, you don't actually need PythonWin to do python scripting, it is just a nice Windows based Integrated Development Environment (IDE).

PythonWin is not installed by default when you install ArcGIS but should be included on the Install disc for manual install.

If that is not available, then you can d/l the apropriate version from Sourceforge.net.

Once it is installed make a shortcut to the executable:  C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\Pythonwin.exe


I hope that helps,


Joel
0 Kudos
SamanthaM
New Contributor
Samantha,

To be clear, you don't actually need PythonWin to do python scripting, it is just a nice Windows based Integrated Development Environment (IDE).

PythonWin is not installed by default when you install ArcGIS but should be included on the Install disc for manual install.

If that is not available, then you can d/l the apropriate version from Sourceforge.net.

Once it is installed make a shortcut to the executable:  C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\Pythonwin.exe



Thanks for the clarification. As you will see in the screenshot below, there is no subfolder for "pythonwin" in C:\Python26\ArcGIS10.0\Lib\site-packages\. Therefore I will go to your next step downloading it from sourceforge.net. See image below
[ATTACH=CONFIG]14962[/ATTACH]

When downloading it from sourceforge, do I just select the latest built, 217 in this case, and download it? Do I have to worry about any compatibility issues with ArcGIS 10 2.6 python? Here is a picture of the pythonwin version I was about to download
[ATTACH=CONFIG]14963[/ATTACH]

Thanks for your help 🙂
0 Kudos
by Anonymous User
Not applicable
Original User: Stringtheory

Samantha,

I'm not sure what the specific differences are between the builds. 
For some reason, even with the same exact PC configuration, I could not get the version a co-worker installed, to work on my machine.

He used either the 216 or 214 build of py2.6.exe.

I ended up getting build 212 to work.  (pywin32-212.win32-py2.6.exe)

I would recommend trying a later build and if you get no install errors, then stick with that, otherwise you can try an earlier build like I had to.


Good Luck,


Joel
0 Kudos
SamanthaM
New Contributor
Thanks again, pardon my ignorance but I am new to all of this. I extracted all the contents from the 217 build to a folder. Do I just remove the "pythonwin" folder and put it in the
C:\Python26\ArcGIS10.0\Lib\site-packages directory? If so, how do I run pythonwin, I do not see an executable in the "pythonwin" folder.

Here is the contents unzipped
[ATTACH=CONFIG]14964[/ATTACH]
0 Kudos
by Anonymous User
Not applicable
Original User: Stringtheory

There are several different python versions for each bulid.

You want to go into the build 217 folder on the sourceforge page and d/l the 2.6 version:  pywin32-217.win32-py2.6.exe

Then run that executable, it should find your existing python directory and install at the location I mentioned previously.

If the installation fails, try the build 216 folder for the version pywin32-216.win32-py2.6.exe and so on.


I hope that clears things up a bit.



Joel
0 Kudos
SamanthaM
New Contributor


I hope that clears things up a bit.



Yes it did, looks like everything is in order now. Thanks for your help and patience I really appreciate it. Build 217 worked fine for me as well.

[ATTACH=CONFIG]14966[/ATTACH]
0 Kudos
by Anonymous User
Not applicable
Original User: mzcoyle

I find Pyscripter to be more useful and easier to use than PythonWin for most scripting. Can be downloaded here.
https://code.google.com/p/pyscripter/
0 Kudos