wxPython+py2exe+win98 ImportError: DLL load failed: A device attachedto the system is not functioning

Thomas Heller thomas.heller at ion-tof.com
Wed Mar 7 05:34:10 EST 2001


"Clark C. Evans" <cce at clarkevans.com> wrote in message news:mailman.983957596.4438.python-list at python.org...
> Hello.  I've recently discovered py2exe and wanted to give
> it a test run (I'm looking for a good software distribution
> system for Python on Windoz).
>
> I was able to make an executable of a command-line python
> program, and it workes just great on my Win2K development
> box, and my Win98 install.  Further, I was able to create a
> wxPython program (the first example from the wxpython.org
> tutorial) and it works great on Win2K.  However, the
> executable created gives the following error when I run it
> on a fresh copy of Win98:
>
>   Traceback (most recent call last):
>     File "<string>", line 1, in ?
>     File "imputil.pyc", line 88, in _import_hook
>     File "<string>", line 20, in _import_top_module
>     File "imputil.pyc", line 197, in import_top
>     File "imputil.pyc", line 252, in _import_one
>     File "<string>", line 95, in _process_result
>     File "wxPython\__init__.pyc", line 20, in ?
>     File "imputil.pyc", line 78, in _import_hook
>     File "imputil.pyc", line 323, in _do_import
>     File "imputil.pyc", line 248, in _import_one
>     File "<string>", line 130, in get_code
>   ImportError: DLL load failed: A device attached to
>                the system is not functioning.
>
> I was wondering if other people have the same problem
> or if I'm doing something wrong here.  Thanks!  Clark Evans
>
Yes, this came up before. The problem is that MSVCRT.DLL and
MSVCIRT.DLL are system dlls, which must live in the system
directory. py2exe shouldn't copy them at all into the dist\
directory.

You have two options:
- Delete these two files from the dist directory
and hope that they are present on the target system
in the correct location.

- Create an installation program (with WISE or InnoSetup
for example) for your exe, and make sure these files are
installed into the SYSTEM directory with proper version checking.

Thomas






More information about the Python-list mailing list