系统:Ubuntu 18.0.4LTS
python:3.6.7
Apache:2.4.29
使用python3 manager.py runserver 正常运行
部署后,访问出现504 Gateway Timeout错误,
检查error.log,报错如下:
Current thread 0x00007fe011005bc0 (most recent call first):
[Mon Feb 25 07:05:10.543692 2019] [core:notice] [pid 3099:tid 140600334638016] AH00051: child pid 4867 exit signal Aborted (6), possible coredump in /etc/apache2
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fe011005bc0 (most recent call first):
[Mon Feb 25 07:05:11.545284 2019] [core:notice] [pid 3099:tid 140600334638016] AH00051: child pid 4869 exit signal Aborted (6), possible coredump in /etc/apache2
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fe011005bc0 (most recent call first):
[Mon Feb 25 07:05:12.546778 2019] [core:notice] [pid 3099:tid 140600334638016] AH00051: child pid 4874 exit signal Aborted (6), possible coredump in /etc/apache2
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fe011005bc0 (most recent call first):
[Mon Feb 25 07:05:13.548268 2019] [core:notice] [pid 3099:tid 140600334638016] AH00051: child pid 4883 exit signal Aborted (6), possible coredump in /etc/apache2
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
已经调试了一通宵了,没有解决。在网上找过各种方法,也没有找到有价值的信息。
相似问题