首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >brew在m1蒙特利mac上安装的uwsgi不加载应用程序

brew在m1蒙特利mac上安装的uwsgi不加载应用程序
EN

Stack Overflow用户
提问于 2021-11-10 14:31:34
回答 1查看 704关注 0票数 0

我用brew在我的macbook (macOS蒙特雷- m1芯片)上安装了uwsgi。我的main.py看起来是这样的:

代码语言:javascript
复制
app = Flask("my_app")
import routing # implemented routes in this module

我的uwsgi.ini文件如下所示:

代码语言:javascript
复制
[uwsgi]
module = main:app
master = true
http-socket = :8081
processes = 4

当我跑的时候

$ uwsgi --ini uwsgi.ini

这将发生:

代码语言:javascript
复制
.
.
.
*** Operational MODE: preforking ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!
no request plugin is loaded, you will not be able to manage requests.
you may need to install the package for your language of choice, or simply load it with --plugin.
!!!!!!!!!!! END OF WARNING !!!!!!!!!!
spawned uWSGI master process (pid: 95857)
spawned uWSGI worker 1 (pid: 95858, cores: 1)
spawned uWSGI worker 2 (pid: 95859, cores: 1)
spawned uWSGI worker 3 (pid: 95860, cores: 1)
spawned uWSGI worker 4 (pid: 95861, cores: 1)

我以前能在大苏尔做得很好,但现在在蒙特利,它表现得很奇怪。(pip安装uwsgi也会导致错误,在另一篇文章中被问及)

EN

回答 1

Stack Overflow用户

发布于 2021-11-10 14:34:49

您已经编译了uWSGI,没有任何内置的请求插件,也没有指示它加载一个插件。

假设您的Python应用程序位于虚拟环境中(为什么不是呢?!),在该虚拟环境中运行pip install uwsgi (您可能需要使用例如--ignore-installed);它将足够聪明,可以在Python插件中为virtualenv的解释器版本编译。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69915090

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档