报错内容如下:
[Wed Jun 01 10:24:14.478004 2022] [mpm_winnt:notice] [pid 40296:tid 348] AH00455: Apache/2.4.53 (Win64) mod_wsgi/4.9.1 Python/3.10 configured -- resuming normal operations
[Wed Jun 01 10:24:14.479003 2022] [mpm_winnt:notice] [pid 40296:tid 348] AH00456: Apache Lounge VS16 Server built: May 4 2022 10:41:15
[Wed Jun 01 10:24:14.479003 2022] [core:notice] [pid 40296:tid 348] AH00094: Command line: 'G:\\MrDoc\\Apache24\\bin\\httpd.exe -d G:/MrDoc/Apache24'
[Wed Jun 01 10:24:14.487004 2022] [mpm_winnt:notice] [pid 40296:tid 348] AH00418: Parent: Created child process 42272
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = 'G:\\MrDoc\\Apache24\\bin\\httpd.exe'
sys.base_prefix = 'C:\\Python310'
sys.base_exec_prefix = 'C:\\Python310'
sys.platlibdir = 'lib'
sys.executable = 'G:\\MrDoc\\Apache24\\bin\\httpd.exe'
sys.prefix = 'C:\\Python310'
sys.exec_prefix = 'C:\\Python310'
sys.path = [
'C:\\Python310\\python310.zip',
'.\\DLLs',
'.\\lib',
'G:\\MrDoc\\Apache24\\bin',
]
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 0x00009160 (most recent call first):
<no Python frame>
解决办法:
在环境变量中设置:PYTHONHOME和PYTHONPATH,重启apache即可。