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
相关推荐
苏三说技术16 分钟前
京东二面:假如SQL中join了10张表,如何优化性能?
后端
vortex516 分钟前
Villain:新一代轻量级 C2 框架完整使用指南
python·网络安全·kali·c2
测试员周周19 分钟前
【AI测试系统】第5篇:AI 编码工具抛硬币?我们用 LangGraph 做了个“确定性+AI”的测试系统(附自愈架构)
人工智能·python·功能测试·测试工具·架构·langchain·单元测试
dvjr cloi19 分钟前
Spring Framework 中文官方文档
java·后端·spring
Levin__NLP_CV_AIGC21 分钟前
py文件中文件复制方法
开发语言·python
庚昀◟26 分钟前
腾讯云 CVM + Docker + Jenkins + GitLab CI/CD 全流程指南(python、flask实现简单计算器)
python·ci/cd·docker·flask·jenkins
H_unique26 分钟前
LangChain:创建工具Ⅰ
python·langchain
Ruci ALYS31 分钟前
SpringBoot Maven快速上手
spring boot·后端·maven
java1234_小锋35 分钟前
谈谈Ribbon和Feign区别?
后端·spring cloud·ribbon
eqwaak035 分钟前
PyTorch张量操作全攻略:从入门到精通
开发语言·人工智能·pytorch·python