python - brew 在 m1 monterey mac 上安装了 uwsgi 不加载应用程序
问题描述
我已经使用 brew 在我的 macbook(macOS monterey - m1 芯片)上安装了 uwsgi。我的 main.py 看起来像这样:
app = Flask("my_app")
import routing # implemented routes in this module
我的 uwsgi.ini 文件如下所示:
[uwsgi]
module = main:app
master = true
http-socket = :8081
processes = 4
当我跑步时
$ uwsgi --ini uwsgi.ini
这会发生:
.
.
.
*** 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 install uwsgi 也会导致错误,在另一篇文章中询问)
解决方案
您已经编译了没有任何内置请求插件的 uWSGI,也没有指示它加载一个。
假设您的 Python 应用程序位于 virtualenv 中(为什么不呢?!),pip install uwsgi
在该 virtualenv 中运行(您可能需要使用 eg --ignore-installed
);它足够聪明,可以在 Python 插件中为 virtualenv 的解释器版本编译。
推荐阅读
- pdf - Adobe PDF Embed API 返回“PREVIEW_RENDERING_FAILED”错误
- javascript - 如何在javascript中将太平洋时间字符串转换为当地时间?
- algorithm - Divide-and-conquer: Polynomial multiplication time complexity
- typescript - 嵌套对象或对象 ID 的类验证器
- python-3.x - 在 Django REST framework 的身份验证中,如何设置默认访问方案以允许所有端点不需要身份验证?
- flutter - 添加状态监听器时线性进度指示器上没有动画
- python -
我有一个服务器(RHEL 7.5),同时有 python2(2.7.5)和 python3(3.7.9)
当我运行下面的代码时,python3 成功通过但 pyt
- python - Python switch-case 意外执行所有案例
- makefile - 如何修复'Makefile:6:***缺少分隔符。停止'。?
- javascript - React - 'react-d3-graph' 不呈现图表组件