我正在尝试使用Twisted在Python中实现WebSocket,参考了这个例子:http://twistedmatrix.com/trac/export/29073/branches/websocket-4173-2/doc/web/howto/websocket.xhtml。不幸的是,我遇到了一个ImportError错误。我不确定该怎么办。我已经多次安装/卸载Twisted,使用了几种方法(从源码、pip和Ubuntu仓库),但问题仍然存在。
Traceback (most recent call last):
File "server.py", line 2, in <module>
from twisted.web.websocket import WebSocketHandler, WebSocketSite
ImportError: No module named websocket
非常感谢您的帮助!