我用brew在我的macbook (macOS蒙特雷- 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安装uwsgi也会导致错误,在另一篇文章中被问及)
发布于 2021-11-10 14:34:49
您已经编译了uWSGI,没有任何内置的请求插件,也没有指示它加载一个插件。
假设您的Python应用程序位于虚拟环境中(为什么不是呢?!),在该虚拟环境中运行pip install uwsgi (您可能需要使用例如--ignore-installed);它将足够聪明,可以在Python插件中为virtualenv的解释器版本编译。
https://stackoverflow.com/questions/69915090
复制相似问题