django uwsgi启动报错failed to get the Python codec of the filesystem encoding
uwsgi启动报错:
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
解决方式:
主要是虚拟环境权限不足问题,
uwsgi.ini配置文件中有配置参数:
#设置虚拟环境的路径
virtualenv=/usr/local/PYTHON_ENV/py312inspection
由于uwsgi启动不是使用root用户,这里虚拟环境是通过root用户创建的,所以会存在权限问题
赋值755权限
chmod 755 -R /usr/local/PYTHON_ENV/py312inspection