문제

Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\ctypes\__init__.py", line 17, in <module>
    from struct import calcsize as _calcsize
ImportError: cannot import name calcsize

>>> from ctypes import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\ctypes\__init__.py", line 17, in <module>
    from struct import calcsize as _calcsize
ImportError: cannot import name calcsize
>>>
도움이 되었습니까?

해결책

어딘가에 길에 또 다른 구조가있는 것 같습니다.

Python이 구조물 모듈을 찾는 위치를 확인하려면 이것을 시도해보십시오.

>>> import inspect
>>> import struct
>>> inspect.getabsfile(struct)
'c:\\python26\\lib\\struct.py'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top