Apache2 Python error, initfsencoding

Hello, I use ubuntu linux server with django, and after setting up the apache2 I always obtain this error:

Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Any idea to solve it?


1 Reply

Doing a little bit of reading on the topic, it looks like that error most commonly stems from a misconfiguration of either the Python Shared Library or the Python Environment. You might find the following links helpful.



If those don't help you find the solution you are looking for I would recommend providing the httpd.conf block from your Apache configuration as well as the Python env output. This can help to gather more information and locate a more specific source of the issue.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct