Menu

#330 'import win32file' in Python 2.5.1 can't locate PYWINTYPES25

closed-works-for-me
nobody
5
2014-08-28
2007-07-28
Sam Denton
No

Adding to Window's PATH fixes everything.

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>c:\python25\python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32file
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
>>> import sys
>>> for d in sys.path: print d
...

c:\python25\lib\site-packages\setuptools-0.6c6-py2.5.egg
c:\python25\lib\site-packages\sqlalchemy-0.3.10-py2.5.egg
c:\python25\lib\site-packages\pil-1.1.6-py2.5-win32.egg
c:\python25\lib\site-packages\epydoc-3.0beta1-py2.5-win32.egg
c:\python25\lib\site-packages\pywin32-210-py2.5-win32.egg
C:\WINNT\system32\python25.zip
c:\python25\DLLs
c:\python25\lib
c:\python25\lib\plat-win
c:\python25\lib\lib-tk
c:\python25
c:\python25\lib\site-packages
>>> ^Z

C:\&gt;path=%PATH%;C:\Python25\Lib\site-packages\pywin32-210-py2.5-win32.egg\pywin3
2_system32

C:\&gt;c:\python25\python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32file
>>> ^Z

Discussion

  • Mark Hammond

    Mark Hammond - 2007-07-29

    Logged In: YES
    user_id=14198
    Originator: NO

    How did you install it? The pywin32_postinstall.py script is supposed to be run by the installer, which copies these DLLs to either your SYSTEM32 directory, or the directory with python.exe in it.

    It looks like you are using an egg provided by someone else - you should discuss your problem with them, as pywin32 does not (yet) support eggs.

     
  • Mark Hammond

    Mark Hammond - 2007-07-29
    • status: open --> closed-works-for-me