I'm having trouble importing the
ctypes Python module from a 32-bit installation of Blender 2.73 on Windows. I need to use Blender's included Python, not the system Python. From the interactive console inside the Blender GUI with no project or anything loaded, I get the following error:
>>> import ctypes Traceback (most recent call last): File "<blender_console>", line 1, in <module> File "C:\Program Files (x86)\Blender Foundation\Blender\2.73\python\lib\ctypes\__init__.py", line 7, in <module> from _ctypes import Union, Structure, Array ImportError: DLL load failed: %1 is not a valid Win32 application.
My Windows installation is 64-bit but I figured that shouldn't matter given that I'm running Python from a 32-bit installation of Blender and
ctypes is part of the initial installation.
I have a feeling that the issue is specific to Windows because I cannot reproduce the issue on 64-bit Ubuntu.