serial I/O install fail -- DLL not found

Ian ian.g.kelly at
Tue Nov 2 00:37:55 CET 2010

On Nov 1, 3:55 pm, Fossil <mskcrpttn... at> wrote:
> Just starting with Python.
> Installed:
>   Python 2.7
>   pywin32-214.win32-py2.7.exe
>   pyserial-2.5.win32.exe
> on a Home WinXP SP3 Toshiba laptop with 2GB memory.  Open Python and
> try to do simple I/O test and can't even get past first line.
> Transcript below.  You will see that
> __name__ is defined as '__main__"
> but path is not defined.  Could this be due to creating the folder
> holding the Python.exe being on the E: drive or for some other obscure
> reason?  The DOS path environmental variable includes:
> e:\Program Files\Python27

Unlikely.  Where I work we run Python with pywin32 across the company
from a network drive and don't have any problems like this one.

> **********transcript*************
> Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit
> (Intel)] on win
> 32
> Type "help", "copyright", "credits" or "license" for more information.>>> from uspp import *
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "E:\Python27\lib\", line 189, in <module>
>     from SerialPort_win import *
>   File "E:\Python27\lib\", line 54, in <module>
>     from win32file import *
>   File "E:\Python27\lib\", line 12, in <module>
>     __load()
>   File "E:\Python27\lib\", line 10, in __load
>     mod = imp.load_dynamic(__name__, path)
> ImportError: DLL load failed: The specified module could not be found.

The paths in this traceback are weird.  If E:\Python27 is where Python
is installed, E:\Python27\lib should be where the files in the Python
standard library reside.  Installed third-party modules such as the
ones above should be located in E:\Python27\lib\site-packages.  It
would appear that some zip files were incorrectly extracted into this

Anyway, your problem appears to be the in E:
\Python27\lib.  This is a wrapper file that the isapi package includes
when creating an executable with py2exe.  It doesn't make any sense
for it to be found in this location, and all it's succeeding in doing
is obscuring the real win32file import, which should be a dll at E:

I suggest reinstalling, putting things into their proper directories
this time, and skipping whatever you unzipped that got you that file.

Hope this helps,

More information about the Python-list mailing list