安装了uwsgi之后,Python仍会报错:没有名为'uwsgi'的模块。

10

我不确定在Python3中导入uwsgi所需要的确切步骤。最近出现了这个问题。我的应用程序中有很多使用Websocket的方法,其中包含import uwsgi语句,它似乎是一个相当常见的模块。

但在确认已正确安装后:

pip install uwsgi
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Requirement already satisfied: uwsgi in /usr/local/lib/python3.4/site-packages (2.0.18)

似乎我无法在任何地方使用这个模块:

root@4a4d65e514ba:/usr/src# python 
Python 3.4.5 (default, Dec 14 2016, 18:54:20) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import uwsgi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'uwsgi'

最近几个月,uwsgi模块是否有所改变?
1个回答

9

uWSGI不是一个模块,它是一个应用服务器。 要在您的应用程序中使用uWSGI模块,您应该使用uWSGI运行您的应用程序。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接