致命的Python错误:init_fs_encoding:无法获取文件系统编码的Python编解码器
我使用django uwsgi在linux服务器上托管了一个Web应用程序,我试图直接从uwsgi调用--ini文件作为致命的Python错误:init_fs_encoding:无法获取文件系统编码的Python编解码器,python,django,ubuntu,nginx,uwsgi,Python,Django,Ubuntu,Nginx,Uwsgi,我使用django uwsgi在linux服务器上托管了一个Web应用程序,我试图直接从uwsgi调用--ini文件作为uwsgi--ini.ini文件,但我遇到了一个类似这样的奇怪错误 [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 v
uwsgi--ini.ini文件
,但我遇到了一个类似这样的奇怪错误
[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.
[uWSGI]从/etc/uWSGI/sites/salesproject.INI获取INI配置
***于[2020年5月19日星期二23:37:24]启动uWSGI 2.0.18(64位)***
使用版本:9.3.0于2020年5月18日编译16:02:04
操作系统:Linux-5.4.0-26-generic#30 Ubuntu SMP周一4月20日16:58:30 UTC 2020
节点名:django服务器
机器:x86_64
时钟来源:unix
pcre jit已禁用
检测到的CPU内核数:2
当前工作目录:/var/uwsgi
检测到的二进制路径:/home/ubaid/.local/bin/uwsgi
chdir()到/home/ubaid/salesproject
您的进程数限制为15402
您的内存页大小为4096字节
检测到的最大文件描述符编号:1024
锁引擎:pthread健壮互斥体
thunder lock:已禁用(可以使用--thunder lock启用)
uwsgi套接字0绑定到UNIX地址/var/uwsgi/salesproject.sock fd 3
Python版本:3.8.2(默认值,2020年4月27日,15:53:34)[GCC 9.3.0]
!!! Python Home不是目录:/Home/ubaid/Env/salesproject!!!
将PythonHome设置为/home/ubaid/Env/salesproject
Python路径配置:
PYTHONHOME='/home/ubaid/Env/salesproject'
PYTHONPATH=(未设置)
程序名='/home/ubaid/Env/salesproject/bin/python'
隔离=0
环境=1
用户站点=1
导入站点=1
sys._base_executable='/home/ubaid/Env/salesproject/bin/python'
sys.base_前缀='/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_前缀='/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”,
]
致命的Python错误:init_fs_encoding:无法获取文件系统编码的Python编解码器
Python运行时状态:核心已初始化
ModuleNotFoundError:没有名为“encodings”的模块
当前线程0x00007f966c94e680(最新调用优先):
真空:unix套接字/var/uwsgi/salesproject.sock已删除。
Salesproject是我的Web应用程序,我没有这样的路径/home/ubaid/Env/Salesproject
,
我的路径是这样的/home/ubaid/salesproject
你能帮我解决这个问题吗?是的,我已经安装了python3您的ini文件的内容是什么