Apache + Python (Django): Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding

I'm trying to host my Django Rest Framework project using Xampp & Apache on my Windows server but I'm getting the following error. Does anyone have an idea what causes it?

I installed Python, mod_wsgi and all the requirements for my app.

Full stacktrace below

Current thread 0x00000e94 (most recent call first):
  <no Python frame>
[Sat Aug 27 11:05:43.581446 2022] [mpm_winnt:notice] [pid 2484:tid 332] AH00428: Parent: child process 5104 exited with status 1 -- Restarting.
[Sat Aug 27 11:05:43.741583 2022] [mpm_winnt:notice] [pid 2484:tid 332] AH00455: Apache/2.4.53 (Win64) PHP/8.1.6 mod_wsgi/4.9.3 Python/3.10 configured -- resuming normal operations
[Sat Aug 27 11:05:43.741583 2022] [mpm_winnt:notice] [pid 2484:tid 332] AH00456: Apache Lounge VS16 Server built: Mar 16 2022 11:26:15
[Sat Aug 27 11:05:43.741583 2022] [core:notice] [pid 2484:tid 332] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Aug 27 11:05:43.757121 2022] [mpm_winnt:notice] [pid 2484:tid 332] AH00418: Parent: Created child process 2976
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 = 'C:\\xampp\\apache\\bin\\httpd.exe'
  sys.base_prefix = 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310'
  sys.base_exec_prefix = 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310'
  sys.platlibdir = 'lib'
  sys.executable = 'C:\\xampp\\apache\\bin\\httpd.exe'
  sys.prefix = 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310'
  sys.exec_prefix = 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310'
  sys.path = [
    'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python310\\python310.zip',
    '.\\DLLs',
    '.\\lib',
    'C:\\xampp\\apache\\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'

httpd.conf

# Django Project
LoadFile "c:/users/administrator/appdata/local/programs/python/python310/python310.dll"
LoadModule wsgi_module "c:/users/administrator/appdata/local/programs/python/python310/lib/site-packages/mod_wsgi/server/mod_wsgi.cp310-win_amd64.pyd"
WSGIPythonHome "c:/users/administrator/appdata/local/programs/python/python310"
WSGIScriptAlias / "c:/users/administrator/Desktop/vi_backend/project/wsgi.py"
WSGIPythonPath "c:/users/administrator/Desktop/vi_backend/"

<Directory "c:/users/administrator/Desktop/vi_backend/project/">
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>

Alias /static "c:/users/administrator/Desktop/vi_backend/static/"
<Directory "c:/users/administrator/Desktop/vi_backend/static/">
    Require all granted
</Directory>

WSGIPassAuthorization on

<VirtualHost _default_:8000>
ServerAdmin some@email.com
DocumentRoot "c:/users/administrator/Desktop/vi_backend"
ServerName 85.211.111.231:8000
ServerAlias 85.211.111.231:8000
ErrorLog logs/anyFile-error.log
CustomLog logs/anyFile-access.log common
</VirtualHost>
Back to Top