gpt4 book ai didi

python - 不断收到 mod_wsgi 和 apache 的致命 Python 错误

转载 作者:行者123 更新时间:2023-12-05 07:11:14 25 4
gpt4 key购买 nike

Current thread 0x00007f5aa48af880 (most recent call first):
no Python frame
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = /var/www/project/venu/bin/python
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = /var/www/project/venu/bin/python
sys.base_prefix = '/opt/python3.8.2'
sys.base_exec_prefix = '/opt/python3.8.2'
sys.executable = '/var/www/project/venu/bin/python
sys.prefix = '/opt/python3.8.2'
sys.exec_prefix = '/opt/python3.8.2'
sys.path = [
'/opt/python3.8.2/lib/python38.zip',
'/opt/python3.8.2/lib/python3.8',
'/opt/python3.8.2/lib/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named encodings

Current thread (most recent call first)

我已将 python 3.8.2 与 django 2.2 兼容。它在本地运行良好,但是当我尝试使用 Apache 和 mod_wsgi 4.7.1 部署它时出现上述错误。有什么建议吗?

最佳答案

在我的例子中,我的特定 LoadModule wsgi_module "/path_to_conda" 由于之前启用的 wsgi apache mod 而被忽略。我必须先使用 a2dismod wsgi 禁用它,as answered here .

关于python - 不断收到 mod_wsgi 和 apache 的致命 Python 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60857953/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com