【问题标题】:brew installed uwsgi on m1 monterey mac doesn not load appbrew 在 m1 monterey mac 上安装了 uwsgi 不加载应用程序
【发布时间】:2021-11-10 14:31:34
【问题描述】:

我已经使用 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 也会报错,在另外的帖子里问过)

【问题讨论】:

    标签: python homebrew uwsgi apple-m1 macos-monterey


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-23
      • 2022-01-25
      • 1970-01-01
      • 1970-01-01
      • 2022-12-14
      • 2023-02-10
      • 1970-01-01
      • 2021-06-18
      相关资源
      最近更新 更多