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
相关推荐
该用户已不存在5 分钟前
Windows 开发环境这么难配,为什么还有那么多人在用?
前端·windows·后端
大模型真好玩6 分钟前
大模型工程面试经典(四)—如何进行大模型多模态微调?
人工智能·python·面试
二闹8 分钟前
告别卡顿!用Python生成器轻松处理海量数据的秘籍
后端·python
zjjuejin33 分钟前
Docker 镜像管理完全指南:从拉取到迁移的终极实践
后端·docker
荔枝lizhi38 分钟前
mac 忘记mariadb 的密码,重置密码,找回密码
后端
꧁༺摩༒西༻꧂40 分钟前
Python生成Excel
开发语言·python·excel
panco6812040 分钟前
Kratos框架处理未注册路由与引入其他标准http服务
后端
不知道取啥耶40 分钟前
基于Springboot和Vue的前后端分离项目
vue.js·spring boot·后端
念念010740 分钟前
数据分析与挖掘工程师学习规划
python
掉头发的王富贵44 分钟前
你还在用Mycat?来试试ShardingSphere-Proxy吧
后端·mysql·开源