在尝试运行简单的扭曲代码时,我收到以下错误
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 322, in RunScript
debugger.run(codeObject, __main__.__dict__, start_stepping=0)
File "C:\Python25\Lib\site-packages\Pythonwin\pywin\debugger\__init__.py", line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File "C:\Python25\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 655, in run
exec cmd in globals, locals
File "C:\Users\Sony\Desktop\my.py", line 1, in <module>
from twisted.internet.protocol import Protocol, Factory
ImportError: No module named twisted.internet.protocol
我使用.exe安装程序成功安装了扭曲。
答案 0 :(得分:1)
确保安装了正确的扭曲版本。例如,如果你使用python 2.7,扭曲的安装程序应该像:Twisted-13.0.0.win32-py2.7.msi
安装程序将配置环境路径,否则必须配置然后重新启动Windows。