1

Any ideas why do I get this errorת while trying import ctypes:

>>> from ctypes import * Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> from ctypes import * File "C:/Python27\ctypes.py", line 3, in <module> libc = ctypes.windll.msvcrt AttributeError: 'module' object has no attribute 'windll' 

1 Answer 1

5

"C:/Python27\ctypes.py" indicates you have some stray ctypes.py in that path that is loaded instead of the standard library ctypes module (which should be Lib/ctypes/__init__.py essentially)

That file tries to load ctypes (again), ending up loading itself (more or less).

Remove/Rename that file.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.