Trouble importing modules in IDLE (Win32)

boblatest at boblatest at
Fri Aug 22 14:29:35 CEST 2008


I wrote aprogram that imports odbc and dbi. Originally I used PyWin,
but now I prefer IDLE for working in Windows. Anyway, when I start my
program from IDLE, it can't import the odbc and dbi modules. However,
when I restart the shell and type "import odbc" at the prompt by, I
don't get an error. When I try to run the program now, I get the error
again. When I now type "import odbc" at the prompt, I get the error as

In short:
In a freshly (re)started shell, I can use "import odbc" by hand. I
can't import odbc from within a script, or by hand after trying to
start such a script. Screen capture follows.


>>> ================================ RESTART ================================
>>> import odbc # <<-no error here!
>>> ================================ RESTART ================================
>>> # script started here

Traceback (most recent call last):
  File "H:\PythonProjekte\", line 1, in <module>
    import odbc
ImportError: DLL load failed: Das angegebene Modul wurde nicht

More information about the Python-list mailing list