python - 安装uwsgi后,python还是会报错: No module named 'uwsgi'

标签 python python-3.x uwsgi

我不确定在 python3 中导入 uwsgi 需要什么。这个问题最近才开始发生。我的应用程序中有 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 模块最近几个月有变化吗?

最佳答案

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

关于python - 安装uwsgi后,python还是会报错: No module named 'uwsgi' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54729969/

相关文章:

python - Django 1.7迁移无法序列化类方法

python - Django 部署 Apache

python - 为什么 python 的 monkeypatch 在导入类而不是模块时不起作用?

nginx - 如何为 Amazon ec2 配置 nginx

python - 在带有 uwsgi 的 flask 应用程序中使用 mysql-connector-python 并收到以下错误 : SSL connection error: SSL_CTX_new failed

python - 从 Docker 启动 uwsgi

python - Django 清理代码

python - 用递归求解完全括号表达式

python - 通过 Selenium 单击链接

python - str.format_map(mapping) 和 str.format 有什么区别