ctypes import not working on python 2.5

Posted by user551906 on Stack Overflow See other posts from Stack Overflow or by user551906
Published on 2010-12-26T22:48:36Z Indexed on 2010/12/26 22:53 UTC
Read the original article Hit count: 190

Filed under:
|

Hi,

I am trying to import ctypes, and I am using Python 2.5.5 installed using macports (on Mac OS X 10.6).

I get an error saying "ImportError: No module named _ctypes" (see details below). As I understand it ctypes is supposed to come preinstalled for python 2.5. Any suggestions?

thanks, Saurabh

Error details:

$ python Python 2.5.5 (r255:77872, Nov 30 2010, 00:05:47) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import ctypes Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/init.py", line 10, in from _ctypes import Union, Structure, Array ImportError: No module named _ctypes

© Stack Overflow or respective owner

Related posts about python

Related posts about ctypes