我使用 django-uwsgi 在 Linux 服务器上托管了一个 web 应用程序,我试图直接从 uwsgi 调用 --ini 文件作为uwsgi --ini .ini file
但我遇到了这样的奇怪错误。
[uWSGI] getting INI configuration from /etc/uwsgi/sites/salesproject.ini
*** Starting uWSGI 2.0.18 (64bit) on [Tue May 19 23:37:24 2020] ***
compiled with version: 9.3.0 on 18 May 2020 16:02:04
os: Linux-5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020
nodename: django-server
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /var/uwsgi
detected binary path: /home/ubaid/.local/bin/uwsgi
chdir() to /home/ubaid/salesproject
your processes number limit is 15402
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 UNIX address /var/uwsgi/salesproject.sock fd 3
Python version: 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0]
!!! Python Home is not a directory: /home/ubaid/Env/salesproject !!!
Set PythonHome to /home/ubaid/Env/salesproject
Python path configuration:
PYTHONHOME = '/home/ubaid/Env/salesproject'
PYTHONPATH = (not set)
program name = '/home/ubaid/Env/salesproject/bin/python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/home/ubaid/Env/salesproject/bin/python'
sys.base_prefix = '/home/ubaid/Env/salesproject'
sys.base_exec_prefix = '/home/ubaid/Env/salesproject'
sys.executable = '/home/ubaid/Env/salesproject/bin/python'
sys.prefix = '/home/ubaid/Env/salesproject'
sys.exec_prefix = '/home/ubaid/Env/salesproject'
sys.path = [
'/home/ubaid/Env/salesproject/lib/python38.zip',
'/home/ubaid/Env/salesproject/lib/python3.8',
'/home/ubaid/Env/salesproject/lib/python3.8/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f966c94e680 (most recent call first):
<no Python frame>
VACUUM: unix socket /var/uwsgi/salesproject.sock removed.
Salesproject 是我的网络应用程序,我绝对没有这样的路径/home/ubaid/Env/salesproject
,
我的路是这样的/home/ubaid/salesproject
,
你能帮我解决这个问题吗?是的,我安装了 python3
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)