简体   繁体   中英

brew installed uwsgi on m1 monterey mac doesn not load app

i have installed uwsgi on my macbook (macOS monterey - m1 chip) using brew. my main.py looks something like this:

app = Flask("my_app")
import routing # implemented routes in this module

and my uwsgi.ini file looks like this:

[uwsgi]
module = main:app
master = true
http-socket = :8081
processes = 4

when i run

$ uwsgi --ini uwsgi.ini

this will happen:

.
.
.
*** 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)

i used to be able to do this just fine in big sur, but now in monterey it's acting weird. (pip install uwsgi also results in error, asked about it in a different post)

You've compiled uWSGI without any built-in request plugins, and not instructing it to load one.

Assuming your Python app is in a virtualenv (and why wouldn't it be?!), run pip install uwsgi in that virtualenv (you may need to use eg --ignore-installed ); it will be smart enough to compile in the Python plugin for the virtualenv's interpreter version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM