我永远不知道怎么读这些.如果有人可以帮助我理解这个,并且可能就如何阅读这些内容提供建议会很有帮助吗?
D:\>python captain2.py
Traceback (most recent call last):
File "captain2.py", line 2, in <module>
from twisted.internet import reactor
File "c:\Python27\lib\site-packages\twisted\internet\reactor.py", line 37, in
<module>
from twisted.internet import default
File "c:\Python27\lib\site-packages\twisted\internet\default.py", line 50, in
<module>
install = _getInstallFunction(platform)
File "c:\Python27\lib\site-packages\twisted\internet\default.py", line 46, in
_getInstallFunction
from twisted.internet.selectreactor import install
File "c:\Python27\lib\site-packages\twisted\internet\selectreactor.py", line 1
4, in <module>
from zope.interface import implements
ImportError: No module named zope.interface
Run Code Online (Sandbox Code Playgroud)
在堆栈回溯中,Python按照调用发生的顺序列出当前的调用堆栈.所以,首先你的代码在captain2.py:
from twisted.internet import reactor
Run Code Online (Sandbox Code Playgroud)
然后reactor模块做了:
from twisted.internet import default
Run Code Online (Sandbox Code Playgroud)
等等,直到selectreactor.py:
from zope.interface import implements
Run Code Online (Sandbox Code Playgroud)
显然zope.interface你的系统上没有模块.