I am running python 2.7 on ubuntu 12.04. I did pip install tornadoin a virtual environment, and python reports that it was a successful installation. But when I run the code in the file tserver.py, I get the following error:
pip install tornado
tserver.py
(venv)$ python tserver.py Traceback (most recent call last): File "tserver.py", line 1, in <module> from tornado.wsgi import WSGIContainer ImportError: No module named tornado.wsgi
I found this question describing a very similar Python Tornado problem : is the WSGI module missing? - but my file is not called tornado.py, so the answer does not help me.
Should you name the server file initially as tornado.py? because, I had and even after the change, I still got this error.
I fixed it after I did sudo pip install tornado --upgrade
sudo pip install tornado --upgrade
. python import tornado, .
import tornado
tornado.pyc tornado.py , .
Source: https://habr.com/ru/post/1535934/More articles:Deserialize JSON to Dictionary in Web Api Controller - jsonPHP Scanner RSS Feed - javascriptHow to fix the "NSInternalInconsistencyException" error in Objective-C? - objective-cValue Type Distribution - c #Регистрация класса t4 в исходное управление? - c#PostgreSQL COPY command - how to write a query in several lines - copyHow to format floating-point number to maximum fixed width in Python - pythonПочему я не могу использовать cout для печати массива строковых значений в С++? - c++C ++ Decorator added to std :: vector - c ++Robocopy becomes endless loop - windowsAll Articles