Compatibility between MySQLdb and Py2EXE

Nigel Linnett Nigel_member at newsguy.com
Fri Jul 6 21:50:51 CEST 2001


Hi Gang,

I have just finished writing an application for use at work, and went to compile
it to a Windows EXE using Py2EXE version 0.2.5 (I have upgraded to 0.2.6 and it
didn't help).

The application is database dependant, so I am uising the MySQLdb module, and
the whole thing works like a charm if I run it from my development directory.

When I compile the code, and go to run the resulting .exe file, this is the
output...

Traceback (most recent call last):
  File "<string>", line 196, in ?
  File "<string>", line 193, in _force_imports
  File "imputil.pyc", line 88, in _import_hook
  File "<string>", line 43, in _import_top_module
  File "imputil.pyc", line 197, in import_top
  File "imputil.pyc", line 252, in _import_one
  File "<string>", line 118, in _process_result
  File "MySQLdb.pyc", line 19, in ?
  File "imputil.pyc", line 88, in _import_hook
  File "<string>", line 43, in _import_top_module
  File "imputil.pyc", line 197, in import_top
  File "imputil.pyc", line 248, in _import_one
  File "<string>", line 153, in get_code
ImportError: _mysql: init failed

I have added on --force-imports MySQLdb,_mysql and it didn't help at all.

During the build process, I receive the following warnings...

warning: py2exe: ***************************************************************
**********
warning: py2exe: * The following modules were not found:
warning: py2exe: *   miscc
warning: py2exe: *   windowsc
warning: py2exe: *   mxDateTime.__version__
warning: py2exe: *   mx.DateTime.Date
warning: py2exe: *   mx.DateTime.Timestamp
warning: py2exe: *   streamsc
warning: py2exe: *   gdic
warning: py2exe: *   framesc
warning: py2exe: *   sizersc
warning: py2exe: *   controls2c
warning: py2exe: *   printfwc
warning: py2exe: *   stattoolc
warning: py2exe: *   mx.DateTime.Time
warning: py2exe: *   mx.DateTime.DateTimeDeltaType
warning: py2exe: *   misc2c
warning: py2exe: *   mx.DateTime.DateTimeType
warning: py2exe: *   controlsc
warning: py2exe: *   windows2c
warning: py2exe: *   eventsc
warning: py2exe: *   windows3c
warning: py2exe: *   DateTime
warning: py2exe: *   ce
warning: py2exe: *   clip_dndc
warning: py2exe: *   mdic
warning: py2exe: *   imagec
warning: py2exe: *   mx.DateTime.tz_offset
warning: py2exe: *   cmndlgsc
warning: py2exe: *   filesysc
warning: py2exe: ***************************************************************
**********

Any ideas?

Nigel




More information about the Python-list mailing list