【发布时间】:2022-11-10 09:32:04
【问题描述】:
当我运行 gunicorn 时,总是执行 python2。
gunicorn -c gunicorn_config.py app:app
...
ps -ef | grep gunicorn
user 34877 1 0 16:31 ? 00:00:00 /usr/bin/python2 /usr/bin/gunicorn -c gunicorn_config.py app:app
user 34883 34877 0 16:31 ? 00:00:00 /usr/bin/python2 /usr/bin/gunicorn -c gunicorn_config.py app:app
user 34884 34877 0 16:31 ? 00:00:00 /usr/bin/python2 /usr/bin/gunicorn -c gunicorn_config.py app:app
...
(如果你想检查我的环境,请关注这个 repo :https://github.com/be-hase/ghe-line-notify)
如何将 gunicorn 作为 python 3 运行?
我认为这是将 gunicorn 作为 python2 运行引起的错误。
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 379: ordinal not in range(128)
【问题讨论】:
标签: python python-3.x gunicorn python-2.x