我正在使用扭曲的API并收到以下错误
Traceback (most recent call last):
File "C:\Documents and Settings\ggne0622\Desktop\Python\google-python-exercises\babynames\SimpleAgent.py", line 16, in <module>
from twisted.internet.iocpreactor import reactor
File "C:\Python27\Lib\site-packages\twisted\internet\iocpreactor\__init__.py", line 8, in <module>
from twisted.internet.iocpreactor.reactor import install
File "C:\Python27\Lib\site-packages\twisted\internet\iocpreactor\reactor.py", line 17, in <module>
from twisted.internet.iocpreactor import iocpsupport as _iocp
ImportError: cannot import name iocpsupport
答案 0 :(得分:1)
看起来你安装了Twisted而没有构建IOCP扩展。构建它们(需要与Python安装兼容的MSVC版本)或使用二进制安装程序 - 例如https://pypi.python.org/pypi/Twisted上的几个中的一个