我使用uwsgi来启动django项目,但却收到了这样的提示:
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
uwsgi的命令为:
uwsgi --http :8000 -H /root/mywords_dict/env --chdir mywords_dict -w mywords_dict.wsgi
肯定是虚拟环境导致的问题。但我不明白的是,mywords_dict的虚拟环境下单独使用python runserver是可以正常运行的,为什么使用uwsgi就不行了呢?
百度得到的 https://www.jianshu.com/p/63f...