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?

Thanks

1 Reply

Linode Staff

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.

https://stackoverflow.com/questions/46759730/django-mod-wsgi-fatal-python-error-py-initialize-no-module-named-encodings

https://stackoverflow.com/questions/38132755/importerror-no-module-named-encodings

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.

Reply

Please enter an answer
Tips:

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