Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#87 pywintypes can't find pywintypes23.dll

v1.0 (example)
closed-out-of-date
nobody
7
2014-08-14
2004-03-16
dak
No

After installing Python v2.3 and pywin32 build 200 on
Windows ME, at startup pythonwin opens a window
titled "Python Traceback when executing InitInstance
handler". The window contains

File "C:\PROGRAMS\PYTHON\Lib\site-
packages\Pythonwin\pywin\framework\intpyapp.py",
line 163, in InitInstance
import interact
File "C:\PROGRAMS\PYTHON\Lib\site-
packages\Pythonwin\pywin\framework\interact.py", line
26, in ?
import winout
File "C:\PROGRAMS\PYTHON\Lib\site-
packages\Pythonwin\pywin\framework\winout.py", line
26, in ?
from pywintypes import UnicodeType
File "C:\PROGRAMS\PYTHON\Lib\site-packages\win32
\lib\pywintypes.py", line 55, in ?
__import_pywin32_system_module__("pywintypes",
globals())
File "C:\PROGRAMS\PYTHON\Lib\site-packages\win32
\lib\pywintypes.py", line 48, in
__import_pywin32_system_module__
raise ImportError, "Can not locate " + filename
exceptions.ImportError: Can not locate pywintypes23.dll

------------------ end of error window contents

I found the file pywintypes23.dll my
C:\Programs\Python installation folder (I can't
remember which subfolder) and copied it to the folders
that seemed likely: C:\Programs\Python\DLLs,
C:\WINDOWS\SYSTEM, C:\WINDOWS\SYSTEM32.
Restarting pythonwin.exe gave the same error msg.

I scanned pywintypes.py for workaround ideas, and
copied pywintypes23.dll to C:\WINDOWS. Now
pythonwin starts up without error (shows the version &
copyright msg and the >>> interpreter prompt).

This is OK as a workaround.

Discussion

  • Logged In: YES
    user_id=1009500

    I had a similar problem, also with Python v2.3 and pywin32
    build 200, but under Win98SE.

    For me, the pywintypes23.dll was installed to the
    c:\windows\system directory. I received the same error
    window. I resolved the problem by adding C:\WINDOWS\SYSTEM
    to my path in AUTOEXEC.BAT.

     
  • Mark Hammond
    Mark Hammond
    2004-04-28

    Logged In: YES
    user_id=14198

    There have been a couple of reports like this on Win9x, with
    the same fix. Apparently the system32 directory is not on
    the path. It sounds like we are trying to copy to
    "system32" when we should just be copying to "windows" on
    that platform.

     
  • Mark Hammond
    Mark Hammond
    2004-04-28

    • labels: 518544 --> installation
    • priority: 5 --> 7
     
  • Bob Chapman
    Bob Chapman
    2004-05-30

    Logged In: YES
    user_id=245167

    This problem also exists with Build 201 of win32all under
    Windows 98SE. Pythonwin displays the same error messages
    and will not start until pywintypes23.dll is copied from
    c:\windows\system (where it is installed) to c:\windows.
    This workaround is not required for Build 201 under Windows
    XP and was NOT required for Build 163 (and previous) under
    Windows 98SE.

     
  • Mark Hammond
    Mark Hammond
    2012-01-28

    • status: open --> closed-out-of-date
     
  • Mark Hammond
    Mark Hammond
    2012-01-28

    The installation world has changed a few times since this was reported.