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
相关推荐
小满zs3 分钟前
Go语言第三章(五谷轮回)
后端·go
tkevinjd2 小时前
MiniCode 项目详解6:原项目控制系统的10个缺陷(已修复)
python·llm·agent
dNGUZ7UGj4 小时前
10分钟完成第一个Python小游戏
python·django
没有梦想的咸鱼185-1037-16634 小时前
AI-Python机器学习与深度学习技术:CNN/Transformer/扩散模型、SHAP可解释及Hermes智能体自动化
人工智能·python·深度学习·机器学习·chatgpt·cnn·transformer
霸道流氓气质4 小时前
SpringBoot中通用工具类库(Utils)封装与使用实践
spring boot·后端·python
Draina6 小时前
CBC填充预言攻击-CBC Padding Oracle Crypto Attack
python·安全·web安全·网络安全·密码学·安全性测试
Angel Q.6 小时前
特征提取 | DINO 到 DINOv3
图像处理·python
不如语冰7 小时前
AI大模型入门-pytorch-张量2 tensor创建
python
NPE~7 小时前
[AI]Agent开发——ADK框架使用
人工智能·python·ai·教程·adk·agent开发