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
相关推荐
期待のcode18 小时前
MyBatisX插件
java·数据库·后端·mybatis·springboot
yaoh.wang20 小时前
力扣(LeetCode) 13: 罗马数字转整数 - 解法思路
python·程序人生·算法·leetcode·面试·职场和发展·跳槽
华仔啊21 小时前
这 10 个 MySQL 高级用法,让你的代码又快又好看
后端·mysql
小鸡吃米…21 小时前
Python PyQt6教程七-控件
数据库·python
码事漫谈1 天前
国产时序数据库崛起:金仓凭什么在复杂场景中碾压InfluxDB
后端
上进小菜猪1 天前
当时序数据不再“只是时间”:金仓数据库如何在复杂场景中拉开与 InfluxDB 的差距
后端
1916zz1 天前
Extreme programing 方利喆 _ 江贤晟
python
长安牧笛1 天前
智能鞋柜—脚气终结者,内置温湿度传感器和紫外线灯,晚上回家,把鞋放进去,自动检测湿度,湿度超标就启动烘干+紫外线杀菌,第二天穿鞋干燥无异味。
python
weixin_457760001 天前
PIL库将图片位深度是1、8、32统一转换为24的方法
python
盖世英雄酱581361 天前
springboot 项目 从jdk 8 升级到jdk21 会面临哪些问题
java·后端