Здравствуйте. Пытаюсь настроить связку uwsgi+django на debian 10 server.
Путь к виртуальному окружению python:
/home/daniil/projects/django/xiaomi_project
При попытке запуска:
uwsgi --ini /home/daniil/projects/django/xiaomi_project/xiaomi/xiaomi.ini
Выдает следующую ошибку:
[uWSGI] getting INI configuration from /home/daniil/projects/django/xiaomi_project/xiaomi/xiaomi.ini
open("./python37_plugin.so"): No such file or directory [core/utils.c line 3724]
!!! UNABLE to load uWSGI plugin: ./python37_plugin.so: cannot open shared object file: No such file or directory !!!
*** Starting uWSGI 2.0.18 (64bit) on [Thu Jun 11 14:13:35 2020] ***
compiled with version: 8.3.0 on 11 June 2020 10:42:47
os: Linux-4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29)
nodename: debian
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 12
current working directory: /home/daniil/projects/django
detected binary path: /home/daniil/projects/django/xiaomi_project/bin/uwsgi
chdir() to /home/daniil/projects/django/xiaomi_project/xiaomi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 63464
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8001 fd 3
Python version: 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
Set PythonHome to /home/daniil/projects/django/xiaomi_project/xiaomi
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fdf8755d3c0 (most recent call first):
Аварийный останов
Модуль encodings для python3.7 и плагин python3.7_plugin.so для uwsgi установлены глобально.
При попытке установить encodings в активированном виртуальном окружении возникает ошибка:
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/encodings/
Аналогично с установкой uwsgi-plugin-python3.7.:
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/uwsgi-plugin-python3-7/
В конфигурационно файле xiaomi.ini прописано следующее:
[uwsgi]
chdir = /home/daniil/projects/django/xiaomi_project/xiaomi
env DJANGO_SETTINGS_MODULE = xiaomi.settings
module = xiaomi.wsgi:application
socket = 127.0.0.1:8001
plugins = python37
home = /home/daniil/projects/django/xiaomi_project/xiaomi
Подскажите, как я могу установить необходимые модуль и плагин?
Буду рад любой помощи.