SystemError: _PyImport_FixupExtension: module _types not loaded
usenet1 at ingfamily.net
usenet1 at ingfamily.net
Thu Feb 15 15:27:09 EST 2007
> "works" in the sense that it prints something; but sys.path is incomplete,
> it lacks site-packages and others (they are added by site.py).
> It appears that you have installed Python on C:\Python25 and you build
> your application executable into c:\temp\pytest\Debug - is that true?
> Hmmm, you will need a debug build of Python too, python25_d.lib/.dll.
> Perhaps at this stage it's easier to use the Release build, because you
> already have python25.lib/dll.
>
> You have to fix the "import site" error. Use the following command on a
> console window before launching your executable:
> set PYTHONVERBOSE=1
> You'll see a lot of lines showing the initial imports; you should be able
> to detect what's the problem at "import site"; usually it's trying to load
> a missing DLL.
>
> --
> Gabriel Genellina
Thank you for your quick reply and your interest. I had a debug
python25_d.lib/dll which i was even using to step into the code to see
why it was failing but it will take me more time to understand the
python code. The other interesting thing I discovered when trying to
build my debug python dll with vs2005 usig the build8 solution was
that I was even getting the exact same error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python25\lib\ctypes\__init__.py", line 6, in <module>
import os as _os, sys as _sys
File "C:\Python25\lib\os.py", line 690, in <module>
import copy_reg as _copy_reg
File "C:\Python25\lib\copy_reg.py", line 7, in <module>
from types import ClassType as _ClassType
File "C:\Python25\lib\types.py", line 93, in <module>
import _types
SystemError: _PyImport_FixupExtension: module _types not loaded
that I was getting when when trying to run the script. I decided at
that point to go back to python2.4, actually activestate python2.4 and
then add the ctype module. I will update this thread on my success or
failure.
Thanks,
Steve
More information about the Python-list
mailing list