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
相关推荐
AAA修煤气灶刘哥25 分钟前
Nginx 为什么这么强?10 万并发压不垮,这 3 个黑科技藏不住了!
后端·nginx·架构
mldong27 分钟前
保姆级教程!手把手教你搭建FastAPI + Vue3前后端分离项目
vue.js·python·全栈
Mr.456739 分钟前
MQTT通信实现方案(Spring Boot 3 集成MQTT)
java·spring boot·后端
codervibe42 分钟前
用 Element Plus 快速搭建教务系统管理后台
后端
元闰子1 小时前
对 Agent-First 数据库的畅想
数据库·后端·aigc
千里码aicood1 小时前
python+vue智慧物业管理系统设计(源码+文档+调试+基础修改+答疑)
vue.js·spring boot·后端
Q_Q5110082851 小时前
python+uniapp基于微信小程序美食点餐系统
spring boot·python·微信小程序·django·flask·uni-app·node.js
kobe_OKOK_1 小时前
django 数据库迁移
数据库·oracle·django
codervibe1 小时前
中高交互蜜罐升级 🚀
后端
codervibe1 小时前
多协议蜜罐初体验 🐝
后端