'Numpy error occurs even though uWSGI Emperor is enabled

overview

uwsgi emperor is enabled but not working numpy on ubuntu.

Why doesn't it work? My portfolio is useless.
I tried a lot but I don't understand anymore

 emperor.uwsgi.service - uWSGI Emperor
     Loaded: loaded (/etc/systemd/system/emperor.uwsgi.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-03-19 22:15:50 JST; 12h ago
   Main PID: 435890 (uwsgi)
     Status: "The Emperor is governing 1 vassals"
      Tasks: 462 (limit: 462)
     Memory: 119.8M
     CGroup: /system.slice/emperor.uwsgi.service
             ├─435890 /var/www/html/venv/bin/uwsgi --master --emperor /etc/uwsgi/vassals
             ├─435899 /var/www/html/venv/bin/uwsgi --master --emperor /etc/uwsgi/vassals

enter image description here

settings

uwsgi.ini

[uwsgi]
chdir=/var/www/html/portfolio/mysite
module=mysite.wsgi:application
master=True
pidfile=/tmp/project-master.pid
vacuum=True
max-requests=5000
daemonize=/var/log/uwsgi/uwsgi.log
single-interpreter=True

add user

# adduser --group uwsgi-data
# adduser --home /etc/uwsgi --no-create-home --shell /sbin/nologin --ingroup uwsgi-data --disabled-login uwsgi-data

change permission

# chown -R uwsgi-data:uwsgi-data /etc/uwsgi
# mkdir /var/log/uwsgi
# chown -R uwsgi-data:uwsgi-data /var/log/uwsgi

create a service file emperor.uwsgi.service

[Unit]
Description=uWSGI Emperor
After=syslog.service

[Service]
# 「/etc/uwsgi/vassals」に存在する設定ファイルを探しuWSGIデーモンを起動する
ExecStart=/var/www/html/venv/bin/uwsgi --master --emperor /etc/uwsgi/vassals
RuntimeDirectory=uwsgi
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all

[Install]
WantedBy=multi-user.target

emperor.ini

[uwsgi]
emperor = /etc/uwsgi/vassals
uid = uwsgi-data
gid = uwsgi-data

turn on

# systemctl start emperor.uwsgi.service
# systemctl status emperor.uwsgi.service
  ● emperor.uwsgi.service - uWSGI Emperor
     Loaded: loaded (/etc/systemd/system/emperor.uwsgi.service; disabled; vendor preset: enabled)
     Active: active (running)

# service apache2 restart


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source