py2exe odbc:cannot import dbi module

Marc Ederis mederis at hotmail.com
Thu Mar 4 06:37:36 EST 2004


Great, it works, thanks Thomas!

But why did you say that odbc32.dll shouldn't be distributed? Because
our distribution should only contain python specific files?
If that's the reason, then I should probably take out MFC42.dll too,
right? Well, I'll just take them out and test... I guess I should
really familiarize myself with distutils, so I understand more about
all this!

-Marc

----------------------------------------------
Thomas Heller <theller at python.net> wrote in message news:<mailman.49.1078254551.12614.python-list at python.org>...
> 
> It seems you have to first explicitely import the dbi module before the
> odbc module can be imported.
> 
> """
> import dbi, odbc
> """
> 
> py2exe doesn't know that dbi.dll is a python extension - it is only
> found as binary dependency.  And you should not (must not?) distribute
> odbc32.dll, which is also copied to the dist folder.
> 
> In py2exe 0.5, you *should* be able to specify
>    dll_exludes = ["odbc32.dll"]
> but this doesn't seem to work.
> 
> Thomas



More information about the Python-list mailing list