ImportError: dynamic module does not define init function (inittypes)
Stefan Behnel
stefan_ml at behnel.de
Sun Feb 15 05:05:34 EST 2009
konteya joshi wrote:
> I see the following error on running the program:
>
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
> File "skyline\alpine_kickoff.py", line 6, in ?
> import re
> File "C:\Perforce\qa\testware\build\vmqa\python\python-2.4.1-as\lib\re.py",
> line 5, in ?
> from sre import *
> File "C:\Per\qa\test\build\vmqa\python\python-2.4.1-as\lib\sre.py",
> line 265, in ?
> import copy_reg
> File "C:\Per\qa\test\build\vmqa\python\python-2.4.1-as\lib\copy_reg.py",
> line 7, in ?
> from types import ClassType as _ClassType
> ImportError: dynamic module does not define init function (inittypes)
>
> Any body who would have an idea on what might be going wrong?
>
> I have python-2.4.1-as directory in my PYTHONPATH which contains the
> Lib,libs...etc in the directory. The Lib contains the re,sre,copy_reg
> inside the directory.
Check if you have a file "types.dll" somewhere in your PYTHONPATH. If
Python finds such a file when resolving the "import types" statement, it
will try to import the DLL instead of the correct module.
Stefan
More information about the Python-list
mailing list