我做了一个,pip install tornado
但我无法运行以下代码,因为WSGI模块丢失了?
http://flask.pocoo.org/docs/deploying/wsgi-standalone/
from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from myapp import app http_server = HTTPServer(WSGIContainer(app)) http_server.listen(5000) IOLoop.instance().start()
Ben Darnell.. 13
如果您的文件名为tornado.py,它将尝试从该文件而不是site-packages上的目录导入内容.这可能是"没有名为X的模块"ImportErrors的最常见来源.重命名文件,它应该工作.