2

在 Ubuntu 12.10 64Bit 上使用 Python 2.7 给我带来了以下麻烦:

Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.c_bool()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'c_bool'
>>> 

我该如何解决这个问题?

4

1 回答 1

3

您工作的目录中是否有一个名为“ctypes.py”的文件?如果是这样,请移动它或(最好)重命名它。

于 2013-03-13T20:15:13.177 回答