繁体   English   中英

使用 mod_wsgi 和 apache 不断收到致命的 Python 错误

[英]keep getting the Fatal Python error with mod_wsgi and apache

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)

我已经用 django 2.2 编译了 python 3.8.2。 它在本地运行良好,但是当我尝试使用 Apache 和 mod_wsgi 4.7.1 部署它并收到上述错误时。 有什么建议 ?

就我而言,由于之前启用了 wsgi apache mod,我的特定LoadModule wsgi_module "/path_to_conda"被忽略了。 我必须先用a2dismod wsgi禁用它,如这里所回答

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM