The Application cannot locate win32ui.pyd (or Python) (126)

Alex Willmer alex at
Wed Aug 4 17:41:49 CEST 2010

On Aug 4, 2:35 pm, vsoler < at> wrote:
> Hi all,
> I just installed python 3.1.2 where I used to have python 2.6.4. I'm
> working on Win7.
> The IDLE GUI works, but I get the following message when trying to
> open *.py files written for py 2.6
>         The Application cannot locate win32ui.pyd (or Python) (126)

win32ui is part of the PyWin32 package. Most likely you have a version
of PyWin32 for Python 2.6 installed, you should uninstall that and
install PyWin32 for Python 3.1. Downloads are at

You should do the same for any other third party packages that are

> Moreover, when I try to open an old *.py file, I sometimes get a
> message saying that the file should be converted to UTF-8. What does
> this mean?

Those files contain non-ascii characters (e.g. £, €, æ). Non-ascii
characters must be encoded when saved using and encoding. UTF-8 is one
such encoding, and it was chosen as the default .py encoding for
Python 3.x. Those files are probably in iso8859, cp432, or perhaps
UTF-16 (aka UCS-2). You can save them in UTF-8 using your favourite
text editor, or declare the encoding so Python 3 knows it. More info:

> I'm also trying to use the 2to3 converter, but I cannot see where the
> converted files are written to!

I think 2to3 prints a diff of the file changes to the console. The -w
command line option should modify files in place.

More information about the Python-list mailing list